Computing.Net > Forums > Programming > VB6.0 and SQL server & windows comp

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

VB6.0 and SQL server & windows comp

Reply to Message Icon

Name: Sstan
Date: August 20, 2003 at 10:13:25 Pacific
OS: XP Home edition
CPU/Ram: 512
Comment:

Hi Guys,
I am new to windows programing, and my computer is running Windows XP Home Edition.
Would somebody tell me how to connect from VB6.0 to SQL Server 2000, and if it's possible, then where I can download for free windows component update for VS.NET?

Stan



Sponsored Link
Ads by Google

Response Number 1
Name: Chi Happens
Date: August 20, 2003 at 11:29:47 Pacific
Reply:

I have answered this question about a hundred times (I wish this forum was easier to search, or organized better)... anyhow:

It is possible, simply use the ADODB objects.

Dim CN As ADODB.Connection
Dim RS As ADODB.RecordSet

Set CN = New ADODB.Connection
Set RS = New ADODB.RecordSet

SQL = "SELECT * FROM MyTable"

CN.Open "Driver={SQL Server};USR=username;PWD=Password;Databse=DatabaseName"

RS.Open SQl, CN

Do While RS.EOF = False
    ' Do Something
    RS.MoveNext
Loop

RS.Close
CN.Close
Set RS = Nothing
Set CN = Nothing


0
Reply to Message Icon

Related Posts

See More


MySQL Full Text Performan... recommend a middleware pr...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: VB6.0 and SQL server & windows comp

VB6.0 and VB.Net www.computing.net/answers/programming/vb60-and-vbnet/573.html

Java and SQL Server 7.0 www.computing.net/answers/programming/java-and-sql-server-70/10976.html

ComboBoxes and SQL Server www.computing.net/answers/programming/comboboxes-and-sql-server/5689.html