Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

NEW ADO CONNECTION

Status
Not open for further replies.

IrinaK

Programmer
May 21, 2001
33
US
This doesn't work:
cn.Open "Provider=MSDASQL.1;Persist Security Info=False;Data Source=N:\applications\ownhist.dsn;"
What's wrong?
I received Error massage:
Data source name not found.

Thank you.


 
What kind of DSN are you trying to use?(user,system,file)
Is the drive 'N:\' local to you or is it a mapped drive?
 
I am trying to use file DSN.
N drive is not local, it's network.
 
after creating file dsn you should use ADODC. then try to connect with that dsn through adodc properties. If connection eshtalished properly then you get the string in a text box of the connection. Copy it and place it after cn.open. I hope you get the solution.
 
Make sure that you are using the same drivers(specified in your code, and in the DSN)This is required for a file DSN
 
Thanks to everybody.
It works!!!!!!!!!!!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top