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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dbDriverNoPrompt with no DSN problem

Status
Not open for further replies.

mygmat123

Technical User
Jun 28, 2004
56
0
0
US
I have a problem trying to link my access table using VB


I can connect using the below connection string ....


Driver={SQL
Server};SERVER=MYSERVER;UID=MYUSERNAME;PWD=myPASSWORD;DATABASE=myDATABASE;


WHEN I USE....


Set dbsODBC = OpenDatabase("",False, False, strConnect)


BUT IF I try to disable the prompt using....


Set dbsODBC = OpenDatabase("", dbDriverNoPrompt, False, strConnect)


my connection either does not connect or it displays the prompt. I think the problem has something to do with me not using a DSN, but I thought I should be able to connect without one. PLEASE HELP!


What am I doing wrong, and why would this be happening?


THANK YOU!!


 
And this ?
Set dbsODBC = OpenDatabase("", dbDriverNoPrompt, False, "ODBC;" & strConnect)

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
I tried that too, and I still get the prompt when the password is incorrect.

I've been trying to figure a solution all night and I am stumped. PLEASE HELP!
 
Does any one know how to check is a OBDC connection string is good and can connect?

thanks

If connection good, then

'do something
else
'do something else

end if


PLEASE HELP!


 
I assume you are trying to connect using either DAO or ODBC-Direct. Have you considered using ADO? The default behavior of ADO is to error out instead of prompting. You can then trap the error. Let me know if you want to try this, and I can provide you with some sample code.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top