returning sql variables to vbscript msgbox
Posted on 2006-11-09
I am performing an sql query via vbscript and I cant seem to get the sql variable to show up in the msgbox. Here is my code
Set myconnection = CreateObject("ADODB.Connection")
set myRecordset = CreateObject("ADODB.Recordset" )
sql = "SELECT TOP 1 Orders.OrderNumber,x = Orders.OrderNumber+1 FROM Orders"
myRecordset.Open sql, myconnection
Set myRecordset = Nothing
Set myconnection = Nothing
I want to get the x variable out of the sql query and pass it to a vbscript variable - which I can return to an application.
Thanks In Advance :)