Results 1 to 2 of 2

Thread: SQL Question

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 2001
    Location
    Western North Carolina
    Posts
    124

    Question 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

  2. #2
    Addicted Member
    Join Date
    Nov 2001
    Posts
    163

    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
    Purushottam

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width