VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Connect to a SQL Server

by www.coderhq.com (5 Submissions)
Category: Databases/Data Access/DAO/ADO
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Fri 17th May 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Connect to a SQL Server

Rate Connect to a SQL Server



' For more code snippets and 
' forums please visit...
' http://www.coderhq.com


Set Conn = CreateObject("ADODB.CONNECTION")

Server = "MYSERVER"
Database = "MYDATABASE"
Username = "MYUSER"
Password = "MYPASS"

Conn.Open "Provider=sqloledb;SERVER=" & Server & ";DATABASE=" & Database & ";UID=" & Username & ";PWD=" & Password


Download this snippet    Add to My Saved Code

Connect to a SQL Server Comments

No comments have been posted about Connect to a SQL Server. Why not be the first to post a comment about Connect to a SQL Server.

Post your comment

Subject:
Message:
0/1000 characters