SQL 2005 Express

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • oasismas
    New Member
    • Aug 2008
    • 1

    SQL 2005 Express

    I have a problem with Sql 2005 Express. I used Windows XP and VB6 (for my program) and database use Sql 2005 Express. Now for stand alone I have success to access the database, but if I use different computer to access the database (with same database and program), the program can't find the database. What I activate my computer as server, so that other computer (2 or 3 different computer) can access database in my computer at the same time.

    My connection like this :

    cnSTR = "Provider=SQLOL EDB.1;" & _
    "Password=lautl angit;" & _
    "Persist Security Info=True;" & _
    "User ID=sa;" & _
    "Initial Catalog=" & DatabaseName & ";" & _
    "Data Source=" & ServerName '

    DeStock.cnStock .ConnectionStri ng = cnSTR
    DeStock.cnStock .Open


    It's true ?
    Thank's for your help
  • OuTCasT
    Contributor
    • Jan 2008
    • 374

    #2
    If the database is on a server machine then your connection string should point to that database.

    [CODE=vb]Password=[password];Persist Security Info=True;User ID=[UserName];Initial Catalog=[dbName];Data Source=[IP address of SQL][/CODE]

    The data source should point to PC where the instance of SQL is installed.
    Last edited by OuTCasT; Oct 9 '08, 02:53 PM. Reason: error

    Comment

    Working...