ADO or ADO.NET

Equis

New member
Joined
Sep 12, 2003
Messages
2
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
 
Ok Cool, Thanks for that, not sure if Ill go .NET just yet

Does anyone know if using an ODBC driver is just as stable as Direct? (Using Mysql or Postgresql)

Thanks

:)
 
Back
Top