G
Guest
Hi all,
I am trying to convert to vb.net from VB6 and I am haveing a major problem
with connecting to an Access database and adding, updating, deleting data.
This is what I usually use in vb6:
sqlText As String
dbConn As New ADODB.Connection
rsConn As ADODB.Recordset
dbConn.Provider = "Microsoft.Jet.OLEDB.4.0"
dbConn.Properties("Data Source") = App.Path & "\mydatabase.mdb"
dbConn.Open
sqlText = "SELECT * FROM publishers WHERE series=1"
Set rsConn = New ADODB.Recordset
rsConn.Open sqlText
And to read :
while not rsconn.eof
text1=rsconn("field1")
rsconn.movenext
wend
I do not use SQL, since the database is local to the app and since I do not
have SQL.
So please, any assistance/guidance/etc would be greatly appreciated.
George
I am trying to convert to vb.net from VB6 and I am haveing a major problem
with connecting to an Access database and adding, updating, deleting data.
This is what I usually use in vb6:
sqlText As String
dbConn As New ADODB.Connection
rsConn As ADODB.Recordset
dbConn.Provider = "Microsoft.Jet.OLEDB.4.0"
dbConn.Properties("Data Source") = App.Path & "\mydatabase.mdb"
dbConn.Open
sqlText = "SELECT * FROM publishers WHERE series=1"
Set rsConn = New ADODB.Recordset
rsConn.Open sqlText
And to read :
while not rsconn.eof
text1=rsconn("field1")
rsconn.movenext
wend
I do not use SQL, since the database is local to the app and since I do not
have SQL.
So please, any assistance/guidance/etc would be greatly appreciated.
George