|
-
Feb 14th, 2002, 03:58 PM
#1
Thread Starter
Lively Member
SQL Question
I have an SQL question....
I am doing an SQL query against a database and am trying to retrieve a value. Well how do I set that particular value to a variable.
FYI... I am using an SQL Server 2000 accessed by an ADO connection. I am trying to get the Payrate for a particular Machine.
Can anyone help.
If so... I appreciate the help.
Thank You
-
Feb 15th, 2002, 07:04 AM
#2
Addicted Member
sql
dim conn as new connection
dim rs as new recordset
conn.open "provider.............."
rs.open "select payroll from table1 where......",conn
rs.movefirst
msgbox rs.fields(0).value
or you can store into variable
dim r as variant
r=rs.fields(0).value
msgbox r
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
|