hello! i'm trying to display a record from an SQL Server database using Visual Basic 6.0. I've decided to use a DataGrid to display a name and some details in it. But when I executed the program, an err msg popped, saying: "Method or data member not found." Here's a snippet of my code:
With DataGrid1
.DataSource = rs
.Row = 1: .Col = 1
.Text = rs!Name
...
I clicked OK on the error msg and the ".DataSource" property was highlighted. Can someone pls help me with this?
In Visual Basic 6, when you assign an object to a variable or property--as opposed to a value type set to a variable or property, you must use the Set keyword. Therefore, you need to say Set .Datasource = rs . Visual Basic .Net is not like this.