Results 1 to 2 of 2

Thread: chnage password in DSN via vb6 code

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Mar 2005
    Posts
    2,580

    chnage password in DSN via vb6 code

    possible to chanage the DSN password from list of my ODBC via vb6 code or shell?
    Last edited by luca90; Jun 10th, 2017 at 06:04 AM.

  2. #2
    New Member
    Join Date
    May 2017
    Posts
    4

    Re: chnage password in DSN via vb6 code

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width