Hello,
I am starting to use VB.net now over vb6
to open DB in vb6 I do:
myConnection.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & VB6.GetPath & "\Data.mdb;Mode=ReadWrite|Share Deny None;Persist Security Info=False"
myConnection.Open()
Dim myrecordset As ADODB.Recordset
myrecordset = New ADODB.Recordset
myrecordset.Open("Select * from test", myConnection, ADODB.CursorTypeEnum.adOpenDynamic, ADODB.LockTypeEnum.adLockOptimistic)
myrecordset.Fields("name").Value = "TESTNEW"
myrecordset.Update()
When I migrated to Vb.Net this still worked, I think it is still using ADO
Could someone show me how to do the above code with ado.net?
Also, is there any reason why I cant just stay with ADO in VB.NET?
Thanks
Rhys
I am starting to use VB.net now over vb6
to open DB in vb6 I do:
myConnection.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & VB6.GetPath & "\Data.mdb;Mode=ReadWrite|Share Deny None;Persist Security Info=False"
myConnection.Open()
Dim myrecordset As ADODB.Recordset
myrecordset = New ADODB.Recordset
myrecordset.Open("Select * from test", myConnection, ADODB.CursorTypeEnum.adOpenDynamic, ADODB.LockTypeEnum.adLockOptimistic)
myrecordset.Fields("name").Value = "TESTNEW"
myrecordset.Update()
When I migrated to Vb.Net this still worked, I think it is still using ADO
Could someone show me how to do the above code with ado.net?
Also, is there any reason why I cant just stay with ADO in VB.NET?
Thanks
Rhys