Here's the situation guys, I make a program that only in one computer the data will be saved. what I mean is I put this program in two or three computers then one must be the "server"? Can you guide me how to do this... here's my code to connect in SQL SERVER.

Public adoconn as ADODB.Connection

Sub main()
   Set adoconn = New ADODB.Connection
   adoconn.ConnectionString = "DSN=My Sample; DESC=My SQL Server; SERVER=localhost; DATABASE=chatdbase; OPTION=3; PORT=3306;UID=;PASSSWORD=;STMT=;"
         adoconn.Open
End Sub

Please configure my code if it is right.

Hope you get what I mean...thanks!

You can use these Connection Strings for SQL 2000:

ODBC with Standard Security
Driver={SQL Server};Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;

ODBC with Trusted connection
Driver={SQL Server};Server=myServerAddress;Database=myDataBase;Trusted_Connection=Yes;

OLEDB .NET with Standard Security
Provider=sqloledb;Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;

OLEDB with Trusted connection
Provider=sqloledb;Data Source=myServerAddress;Initial Catalog=myDataBase;Integrated Security=SSPI;

SqlConnection (.NET) with Standard Security
Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;
OR
Server=myServerAddress;Database=myDataBase;User ID=myUsername;Password=myPassword;Trusted_Connection=False;

SqlConnection (.NET) with Trusted connection
Data Source=myServerAddress;Initial Catalog=myDataBase;Integrated Security=SSPI;

You can use any of the Driver based on your requirement.

using SQL Server Native Driver is the fastest. Then comes OLEDB and then ODBC.

You can even write a generic data access class to make it Driver independent.

You can use any of the Driver based on your requirement.

using SQL Server Native Driver is the fastest. Then comes OLEDB and then ODBC.

You can even write a generic data access class to make it Driver independent.

Can you please show me some samples on how to do it, please?

This article has been dead for over six months. Start a new discussion instead.