CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2000
    Location
    Krasnoyarsk, Russia
    Posts
    12

    SQL Server connection

    How may I open ADO connection to SQL Server using Windows NT authentication?
    Thanks in advance...


  2. #2
    Join Date
    Aug 1999
    Location
    India, West Bengal
    Posts
    36

    Re: SQL Server connection

    ServerName = "Servername"
    UserName = "username"
    db_conn.Provider = "sqloledb"
    db_conn.Properties("Data Source").Value = ServerName
    db_conn.Properties("Initial Catalog").Value = "databasename"
    db_conn.Properties("User ID").Value = UserName
    db_conn.Open

    where db_conn is the ADO database connection established
    U hv to define db_conn as new adodb.connection at module level.

    This is one way of establishing a connection with SQL Server.
    Or else define a DSN entry on your connection and point to the SQL Server using Windows NT authentication.



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

Featured