DAO to ADO.NET

Hi,
Can you help me, is there any solution to convert Technology DAO (VB6)  to ADO.NET.
Thx
thinobjectsAsked:
Who is Participating?
 
frodomanCommented:
I assume you mean a tool you can use?  There are a few (e.g.: http://www.vbdotnetheaven.com/Code/May2004/vb6tovbnet.asp ) but from what I've seen none of them are very good and you're better off doing the conversion yourself in Visual Studio.



0
 
DabasCommented:
Hi thinobjects,
It is not that difficult to convert, and I have done it often enough
Main points:

DAO:
Dim db as DAO.Database
Dim rs as DAO.Recordset

Set db = OpenDatabase(Path)
Set rs = db.OpenRecordset("....")

ADO

Dim cn as ADODB.Connection
Dim rs as ADODB.Recordset

Set cn = New ADODB.Connection
Set rs = New ADODB.Recordset

cn.ConnectionString = "YourConnectionString"
cn.Open

rs.Open "..."


Dabas
0
 
MilanKMCommented:
Read the whole story from Microsoft:~
http://support.microsoft.com/default.aspx?scid=KB;en-us;225048&

Hope this helps
MilanKM
0
 
thinobjectsAuthor Commented:
Thx Friend.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.