I am trying to print the selected value from a query in VB6 this is my code
dim query as string
dim stsstring as string
dim rs as adobd.recordset
query = "select status from x where y='"& randomString &"'"
set rs = mainmodule.dbutils.dbconnection.connection.execute(query)
set rs = nothing
stsstring = rs.fields("status")
msgbox stsstring
I get error here
stsstring = rs.fields("status")
Object variable or with block variable not set
Thanks in advance!