M
Mark Worsnop
Below is a short simple ADO in VB6. I have been messing with this most of
the day trying to do the same thing in VB .NET ADO.NET. Can anyone give me a
clue where to look next?
I think I got the connection figured out, but I usually connect once at the
beginning of the program globally, but this seems to only let me declare the
Connection in the class I am in. Sorry for all the dumb questions, still
learning.
THANK YOU!
BaseConnStr = "Provider=MSDataShape.1;Persist Security Info=True;Data
Provider=SQLOLEDB.1;Trusted_Connection=yes ;Data Source=xx;User
ID=xx;Password=xx;Initial Catalog=xx"
CN.Open BaseConnStr
RS.Open "Select top 10 name from customer ", CN, adOpenStatic, adLockReadOnly
While Not RS.EOF
Text1.Text = Text1.Text & RS.Fields("name").Value & vbCrLf
RS.MoveNext
Wend
RS.Close
Set RS = Nothing
the day trying to do the same thing in VB .NET ADO.NET. Can anyone give me a
clue where to look next?
I think I got the connection figured out, but I usually connect once at the
beginning of the program globally, but this seems to only let me declare the
Connection in the class I am in. Sorry for all the dumb questions, still
learning.
THANK YOU!
BaseConnStr = "Provider=MSDataShape.1;Persist Security Info=True;Data
Provider=SQLOLEDB.1;Trusted_Connection=yes ;Data Source=xx;User
ID=xx;Password=xx;Initial Catalog=xx"
CN.Open BaseConnStr
RS.Open "Select top 10 name from customer ", CN, adOpenStatic, adLockReadOnly
While Not RS.EOF
Text1.Text = Text1.Text & RS.Fields("name").Value & vbCrLf
RS.MoveNext
Wend
RS.Close
Set RS = Nothing