Code to connect SQL Server 7.0 to Visual Basic 6.0

I would like to know how to connect SQL Server 7.0 to Visual Basic 6.0. Can you please give me the codes?

    Requires Free Membership to View

This code can be used for the connection:

Public adoconn as ADODB.Connection

Sub main()
Set adoconn = New ADODB.Connection
adoconn.ConnectionString = "Driver={SQL
Server};Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=m
yPassword;"
adoconn.Open
End Sub

This was first published in December 2007

Join the conversationComment

Share
Comments

    Results

    Contribute to the conversation

    All fields are required. Comments will appear at the bottom of the article.