Results 1 to 4 of 4

Thread: Connecting to SQL express

  1. #1

    Thread Starter
    Member
    Join Date
    Sep 2006
    Posts
    34

    Exclamation Connecting to SQL express

    i build application for my work, and the only problem that im having is that i cant connecto to the server on my desktop computer. i put this connection string in my app and from my pc to my pc i connect.

    "Data Source=sony-02391;Initial Catalog=QADB.MDF;Integrated Security=SSPI;"

    the issue is when i copy the app to another pc on the network it says that cannot connect. is there any problem if the other pc is outside the workgroup im in.?

    thank you in advance for your help guys. im new in programming. thanks again.

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Connecting to SQL express

    The Data Source should be SERVER_NAME\INSTANCE_NAME. See www.connectionstrings.com for the appropriate format for all sorts of connections.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Member
    Join Date
    Sep 2006
    Posts
    34

    Re: Connecting to SQL express

    "Data Source=sony-02391.\SQLExpress;Initial Catalog=QADB.MDF;Integrated Security=SSPI;"

    ??? like that - im sorry im new to SQL

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Connecting to SQL express

    Does your server name have a dot in it? In a path a dot stands for the current, so ".\SQLEXPRESS" means the SQL Server instance named SQLEXPRESS on the current machine. If SQLEXPRESS is not the name of your instance then change it. If the instance is not on the current machine then supply the name of the machine that it's on. I thought that SERVER_NAME\INSTANCE_NAME was pretty clear.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

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