Set Variable = query Result
I want to set a variable to equal the result from a database query.
ex:
VB Code:
selectSQL = "SELECT FirstName, LastName FROM Client;"
qResults = ConSource.Execute selectSQL
That should give you an idea of what im trying to do, Is this even possible?
Thanks,
Ryan
Re: Set Variable = query Result
Dim qResults as Recordset
set qResults = ConSource.openrecordset(selectSQL)
I think thats it (that may be for DAO though and not ADO...my ADO is rusty)
Re: Set Variable = query Result
Quote:
Originally Posted by [LGS]Static
Dim qResults as Recordset
set qResults = ConSource.openrecordset(selectSQL)
I think thats it (that may be for DAO though and not ADO...my ADO is rusty)
Thanks for the quick reply,
But i forgot to mention i am using a DSN Connection.
Ryan
Re: Set Variable = query Result
I tried this
VB Code:
Dim Query As rdoResultsets
SQL = "SELECT FirstName, LastName FROM client;"
Set Query = conSource.rdoResultsets(SQL)
But that doesnt seem to work either.