•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Visual Basic 4 / 5 / 6 section within the Software Development category of DaniWeb, a massive community of 456,488 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,733 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums
Views: 3935 | Replies: 7
![]() |
•
•
Join Date: Jul 2007
Location: Philippines
Posts: 253
Reputation:
Rep Power: 0
Solved Threads: 28
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.
Please configure my code if it is right.
Hope you get what I mean...thanks!
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 SubPlease configure my code if it is right.
Hope you get what I mean...thanks!
or you can use server IP.
B.Sc Computer Science, Helwan University
Microsoft Student Partner
Personal blog http://ramymahrous.blogspot.com/
Arabic technical blog http://fci-h-ar.blogspot.com/
English technical blog http://fci-h.blogspot.com/
Microsoft Student Partner
Personal blog http://ramymahrous.blogspot.com/
Arabic technical blog http://fci-h-ar.blogspot.com/
English technical blog http://fci-h.blogspot.com/
•
•
Join Date: Dec 2006
Location: United States
Posts: 613
Reputation:
Rep Power: 3
Solved Threads: 15
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;
SqlConnection (.NET) with Trusted connection
Data Source=myServerAddress;Initial Catalog=myDataBase;Integrated Security=SSPI;
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;
Server=myServerAddress;Database=myDataBase;User ID=myUsername;Password=myPassword;Trusted_Connection=False;OR
SqlConnection (.NET) with Trusted connection
Data Source=myServerAddress;Initial Catalog=myDataBase;Integrated Security=SSPI;
•
•
Join Date: Dec 2006
Location: United States
Posts: 613
Reputation:
Rep Power: 3
Solved Threads: 15
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.
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.
•
•
Join Date: Jul 2007
Location: Philippines
Posts: 253
Reputation:
Rep Power: 0
Solved Threads: 28
•
•
•
•
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?
•
•
Join Date: Dec 2006
Location: United States
Posts: 613
Reputation:
Rep Power: 3
Solved Threads: 15
What sample do you want? The link in vbsqluser post has some samples. Let me know if you need more elanorate one.
![]() |
•
•
•
•
•
•
•
•
DaniWeb Visual Basic 4 / 5 / 6 Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
ad advertising ajax architecture asp backup beta business centro crash daniweb database dell developer development doubleclick enterprise google hacker internet linux longhorn mail microsoft mmorpg msdn news novell office open qmail red hat rhel security server smtp software source sql survey suse vista windows windows server
- How to Connect to an SQl server using C language (C)
- How to connect a SQL stored procedure to a windows application? (VB.NET)
- connect SQL Server by button (C#)
- How to connect ASP with sql server ? (Community Introductions)
- ERROR 2002: Can't connect to local MySQL server (MySQL)
- google "keyword" question (Search Engine Optimization)
- "Server busy" and adware when connecting to cstrike server (Viruses, Spyware and other Nasties)
- Can't connect to local MySQL server (MySQL)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: Getting the runtime error 424 (objet required)
- Next Thread: resetting variable that is of type date to "00/00/0000"


Linear Mode