|
-
Apr 16th, 2004, 01:52 PM
#1
Thread Starter
Frenzied Member
connection string for ado on a dsn
hi all, i have tried for an hour now to build an ado connection to open access database thru a n ODBC DSN.
I have created the dsn from the control panel, it's name is reports
now it doesn;t connect although if i used the location of the file directly , it works fine.
i need the right connectionstring for DSN source including a password.
by the way , i have checked www.connectionstrings.com , but the only thing for dsn is for VB6 conections.
PLz help in this issue
THX in advance
BST RGDS
-
Apr 16th, 2004, 10:26 PM
#2
Frenzied Member
DSN
Code:
oConn.Open "DSN=mySystemDSN;" & _
"Uid=myUsername;" & _
"Pwd=myPassword"
File DSN
Code:
oConn.Open "FILEDSN=c:\somepath\mydb.dsn;" & _
"Uid=myUsername;" & _
"Pwd=myPassword"
Being educated does not make you intelligent.
Need a weekend getaway??? Come Visit
-
Apr 17th, 2004, 07:11 AM
#3
Thread Starter
Frenzied Member
thx for your reply.
please note:
1 - i tried your connection string, but it raised an exception " provider is required to connect".
2 - i am using an oledbconnection , is there a problem in that????
thx in advance for your time
BST RGDs
-
Apr 20th, 2004, 10:31 PM
#4
Hyperactive Member
I am having a similar problem but I am trying to connect to an AS/400 through ODBC with .Net. I can connect using vb 6.0 but I need it to run as a service.
The thing that jumps out to me for you is you stat you are using an ODBC connection but the oledb provider. Have you tried the odbc provider for .net? I would start there for your odbc connection.
Jerel
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|