Create a DSN for SQL Server


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 6 of 6

Thread: Create a DSN for SQL Server

  1. #1
    Join Date
    Aug 2004
    Posts
    43,023

    Create a DSN for SQL Server

    [Originally posted by Steve Letford]

    I have been using the API sqlconfigdatasource to add a DSN to my PC in code but can't figure out how to use window authentication.

    It always defaults to the SQL Server authentication.

    Appreciate the help.

    Steve

  2. #2
    Join Date
    Aug 2004
    Posts
    43,023

    User & password in sqlconfigdatasouce

    [Originally posted by S. Jaicind]

    hai steve
    To create windows authentication in sqlconfigdatasource set attribute 'Trusted_Connection=Yes'.

    I have a problem creating dsn, i wanted to set the sql user name and password in sql server authentication mode. But sqlconfigdatasource sets default to sqlauthenticationmode and sets windows user id. if u can find a solution, do inform.
    Jaicind

  3. #3
    Join Date
    Aug 2004
    Posts
    43,023

    Re:User & password in sqlconfigdatasouce

    [Originally posted by Steve Letford]

    Hi Jaicind,
    did you ever figure out how to configure it with a username and password. I'm trying to do the same thing and having problems.

    Steve

  4. #4
    Join Date
    Aug 2004
    Posts
    43,023

    Re:Re:User & password in sqlconfigdatasouce

    [Originally posted by Steve Letford]

    I've just been checking the settings in the registry and it seems that the 'LastUser' key is what we need to adjust and that can't be done by sqlconfigdatasouce, as it doesn't recognise that as a key word.

    Therefore, the way I understand it is the only way to do this is by writing straight to the registry.

    If anyone knows of the API that will do all this, I'd appreciate the details.

    Thanks

    Steve

  5. #5
    Join Date
    May 2008
    Posts
    1

    windows Authentication

    I need To Sql Authentication And You need To Windows Authentication.
    I have Windows Authentication Source code and you have Sql Authentication Source code , So you go Together TREATMENT
    my Maile : Removed By Mod
    Last edited by Hack; 05-07-2008 at 08:38 AM. Reason: Removed EMail Address

  6. #6
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,666
    Welcome to DevX

    First of all, you have responded to a thread that has seen no action for over 6 years so I doubt you are going to get much reaction.

    Second, I have edited your post and removed your email address.

    You should never post your email address in an open post on an open forum. Mail spam bots can pick that up and before you know it, your mailbox is full of junk mail. If you wish to share your email address with other forum members, please do so via our PM system.

    In addition, we prefer all answers to questions, as well as any code shared, be publically posted rather than sent via EMail or PM. That way, everyone with a similar problem can benefit.

    Thanks.

    Now, what specifically is the issue that you need a resolution to?
    I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
    Please use [Code]your code goes in here[/Code] tags when posting code.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    Modifications Required For VB6 Apps To Work On Vista

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center