Equis Posted September 13, 2003 Posted September 13, 2003 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 can't just stay with ADO in VB.NET? Thanks Rhys Quote
Moderators Robby Posted September 13, 2003 Moderators Posted September 13, 2003 ADO.NET is quite different then ADO, there is no recordset as you know it. You may want to read some tutorials so as to get familiar with it's objects and such. check these out... http://www.devarticles.com/cats/29 http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconoverviewofadonet.asp Quote Visit...Bassic Software
Equis Posted September 13, 2003 Author Posted September 13, 2003 Ok Cool, Thanks for that, not sure if I'll go .NET just yet Does anyone know if using an ODBC driver is just as stable as Direct? (Using Mysql or Postgresql) Thanks :) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.