Using SQL Server

Cassio

Well-known member
Joined
Nov 30, 2002
Messages
276
Location
Rio de Janeiro
Hi! Very newbie question:
I have an app that uses a SQL Server thats on my machine. I want to move this app to another machine and still use the SQL Server thats on my machine. What do I have to change?

Heres my connection string:

Code:
Private ConnectionString As String = "Database=" & Modulo.DatabaseName & _
    ";Server=" & Modulo.ServerName & ";Integrated Security=SSPI;Connect Timeout=5"

What do I have to add to this connection string? User ID and Password?
What else do I have to do for the other machine access my SQL Server?

Thanks!
 
The easies things to change are the server name (in your Modulo.ServerName variable/property/whatever) and add a UserID/Password. Make your connection string look something like this:
Code:
Private ConnectionString As String = "Database=" & Modulo.DatabaseName & _
    ";Server=" & Modulo.ServerName & ";Connect Timeout=5;uid=" & ModuloUserName & ";pwd=" & Modulo.Password

In the end, it should look something like this:
Database=DBName;Server=yourserver;Connect Timeout=5;uid=sa;pwd=test

-Nerseus
 
Back
Top