Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

chnage password in DSN via vb6 code

luca90

New member
Joined
Mar 22, 2005
Messages
1,975
possible to chanage the DSN password from list of my ODBC via vb6 code or shell?
 
Last edited:

comprar

New member
Joined
May 25, 2017
Messages
4
Here is a string I use in one of my projects which connects to SQL Server, Tested with SQL Server 6.5 - 2008 using ADO.

Code:
Code:
Provider=MSDASQL; DRIVER=Sql Server; SERVER=p42800; DATABASE=myDatabase; UID=MyUserID; PWD=MyPassword
Here is another which uses a DSN created by odbc manager

Code:
Code:
PROVIDER=MSDASQL;dsn=myDSNName;uid=MyUserID;pwd=MyPassword;
I have used both of these in several projects and never had an issue. I would recommend the top one as it does not require you to create a DSN.


btw in my Case the PC Named p42800 is running SQL Server 2000 and by using the PC name rather than local host that string works both on that pc and from any other pc on the network as well.
 
Top