5 pts.
0
Q:
How to connect Access database to a Visual Studio 2005?
i use the following code to connect and i created DSN but its not getting connected... whats my fault can anyone help me??

Dim X As ADODB.Connection
Dim RS As ADODB.Recordset
Dim RS1 As ADODB.Recordset


i am getting underlined error in adodb.connection, adodb.recordset

i think there is some error in the DSN creation. so anyone please help me to create DSN in the same machine which i am working.
ASKED: Oct 2 2008  6:38 AM GMT
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
0
29340 pts.
0
A:
 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0
  • AddThis Social Bookmark Button
The compilation error could happen if you have not imported ADODB.

Try adding this (at the beginning):

Imports ADODB


I think you also need to set reference to MS ADO objects 2.7 library using Project->Add Reference menu item and then select COM tab.

Once you do this, ADO objects are available and you should be able to see ADODB namespace.


Hope this helps.
Last Answered: Oct 2 2008  3:07 PM GMT by Carlosdl   29340 pts.
0
0
Discuss This Answer:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _



0