Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Connection String for VB with MS SQL Server 2005 Express Edition

Connection String for VB with MS SQL Server 2005 Express Edition

Scheduled Pinned Locked Moved Visual Basic
helpdatabasec++sql-server
6 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    aaraaayen
    wrote on last edited by
    #1

    Hi All, In my application, i am using vb 6.0 as front end and MS-SQL Server 2005 Express Edition as Back End. SQL Server 2005 is installed in another system called Sys2. I am using the following connection string in Visual Basic, to connect to SQL Server. Conn.ConnectionString = "Driver={SQL Native Client};Server=Sys2\SQLEXPRESS;Database=OT_LOG;Trusted_Connection=yes;" But when I try to run the application, its giving the following error: [Microsoft][SQL Native Client][SQL Server]Login failed for user". The user is not associated with a trusted SQL Server connection. Please help me in this issue. Thanks in Advance, Regards,

    V C T 3 Replies Last reply
    0
    • A aaraaayen

      Hi All, In my application, i am using vb 6.0 as front end and MS-SQL Server 2005 Express Edition as Back End. SQL Server 2005 is installed in another system called Sys2. I am using the following connection string in Visual Basic, to connect to SQL Server. Conn.ConnectionString = "Driver={SQL Native Client};Server=Sys2\SQLEXPRESS;Database=OT_LOG;Trusted_Connection=yes;" But when I try to run the application, its giving the following error: [Microsoft][SQL Native Client][SQL Server]Login failed for user". The user is not associated with a trusted SQL Server connection. Please help me in this issue. Thanks in Advance, Regards,

      V Offline
      V Offline
      Vimalsoft Pty Ltd
      wrote on last edited by
      #2

      hi http://blogs.msdn.com/sql_protocols/archive/2005/09/28/474698.aspx[^Try this ] Hope it Helps

      Vuyiswa Maseko, Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding VB.NET/SQL7/2000/2005 http://vuyiswamb.007ihost.com http://Ecadre.007ihost.com vuyiswam@tshwane.gov.za

      1 Reply Last reply
      0
      • A aaraaayen

        Hi All, In my application, i am using vb 6.0 as front end and MS-SQL Server 2005 Express Edition as Back End. SQL Server 2005 is installed in another system called Sys2. I am using the following connection string in Visual Basic, to connect to SQL Server. Conn.ConnectionString = "Driver={SQL Native Client};Server=Sys2\SQLEXPRESS;Database=OT_LOG;Trusted_Connection=yes;" But when I try to run the application, its giving the following error: [Microsoft][SQL Native Client][SQL Server]Login failed for user". The user is not associated with a trusted SQL Server connection. Please help me in this issue. Thanks in Advance, Regards,

        C Offline
        C Offline
        ChandraRam
        wrote on last edited by
        #3

        Look up www.connectionstrings.com[^] - it should give you exactly what you are looking for. HTH

        1 Reply Last reply
        0
        • A aaraaayen

          Hi All, In my application, i am using vb 6.0 as front end and MS-SQL Server 2005 Express Edition as Back End. SQL Server 2005 is installed in another system called Sys2. I am using the following connection string in Visual Basic, to connect to SQL Server. Conn.ConnectionString = "Driver={SQL Native Client};Server=Sys2\SQLEXPRESS;Database=OT_LOG;Trusted_Connection=yes;" But when I try to run the application, its giving the following error: [Microsoft][SQL Native Client][SQL Server]Login failed for user". The user is not associated with a trusted SQL Server connection. Please help me in this issue. Thanks in Advance, Regards,

          T Offline
          T Offline
          Tim Carmichael
          wrote on last edited by
          #4

          If you are using a trusted connection, then your account must be defined on the remote node (Sys2 in your case). A probable better solution is to use a defined account and password; for example: Driver={SQL Native Client};Server=Sys\SQLEXPRESS;Database=OT_LOG;uid=OT_Log_User;pwd=OT_Log_User_PWD The username and password can be stored in the registry, a config file, and INI file, etc. Hope that helps. Tim

          A 1 Reply Last reply
          0
          • T Tim Carmichael

            If you are using a trusted connection, then your account must be defined on the remote node (Sys2 in your case). A probable better solution is to use a defined account and password; for example: Driver={SQL Native Client};Server=Sys\SQLEXPRESS;Database=OT_LOG;uid=OT_Log_User;pwd=OT_Log_User_PWD The username and password can be stored in the registry, a config file, and INI file, etc. Hope that helps. Tim

            A Offline
            A Offline
            aaraaayen
            wrote on last edited by
            #5

            Hi Tim, Thanks lot for your help. Can you give me some idea about that username and password. Is that username and password same as windows username and password or we need to create specific for this. If so, how to do with that. Regards,

            T 1 Reply Last reply
            0
            • A aaraaayen

              Hi Tim, Thanks lot for your help. Can you give me some idea about that username and password. Is that username and password same as windows username and password or we need to create specific for this. If so, how to do with that. Regards,

              T Offline
              T Offline
              Tim Carmichael
              wrote on last edited by
              #6

              The username and password can be whatever you want; there are defined on the SQLServer end. Create a user account, define the password, and grant access to the database.

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups