Results 1 to 4 of 4

Thread: Retrieving Data Using SQL

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2000
    Location
    India
    Posts
    9
    Hi there!
    I need to retrieve the return value of an SQL Statement to a variable. The SQL statement looks like this

    SELECT MAX(SAL) MSAL FROM EMP

    the return value should get bound into a variable in VB. Can any one help me in tracing a way out.

  2. #2
    Frenzied Member monte96's Avatar
    Join Date
    Sep 2000
    Location
    Somewhere in AZ
    Posts
    1,379
    If you open your query using a recordset, the value will be in recordset.fields(0)

    oOOo--oOOo
    __/\/\onte96
    oOOo--oOOo
    Senior Programmer/Analyst
    MCP
    [email protected]
    [email protected]


    Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..

  3. #3

    Thread Starter
    New Member
    Join Date
    Oct 2000
    Location
    India
    Posts
    9

    Smile Thanks Monte

    But i am Using RDO for accessing database. therefore in case of resultset would it work? i.e., something like

    resultset.rdocolumns(0)

    to retrieve the value.

  4. #4
    Frenzied Member monte96's Avatar
    Join Date
    Sep 2000
    Location
    Somewhere in AZ
    Posts
    1,379
    Not sure with RDO.. I would assume so..
    oOOo--oOOo
    __/\/\onte96
    oOOo--oOOo
    Senior Programmer/Analyst
    MCP
    [email protected]
    [email protected]


    Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..

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