|
-
Jul 19th, 2000, 04:45 AM
#6
Addicted Member
I just did the following against a small table I have in SQL Server.
The table looks like this
num queryStatus
----------- --------------------
1 Open
2 Closed
3 Pending Analyst
4 Pending Customer
5 Development
Private Sub Command1_Click()
Dim lc_command As New ADODB.Command
Dim lconn As New ADODB.Connection
Dim lrs_records As New ADODB.Recordset
Dim ls_records As String
lconn.Open "DSN=class"
lc_command.CommandText = "select * from query_status where num < 5 order by querystatus"
lc_command.CommandType = adCmdText
lc_command.ActiveConnection = lconn
Set lrs_records = lc_command.Execute
lrs_records.MoveFirst
Do Until lrs_records.EOF
ls_records = ls_records & vbCrLf & lrs_records!querystatus
lrs_records.MoveNext
Loop
Debug.Print ls_records
End Sub
This doesn't error out, and gives the following:
Closed
Open
Pending Analyst
Pending Customer
Thanks
Lenin
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|