We are doing a database verification point and we want to know how to receive data from SQL.
We are using the code below:
Dim outputStr as string
Dim connection as long
Dim prompt as integer
Dim retcode as variant
Dim query as string
connection = SQLOpen("DSN=MySql; UID=root", outputstr, prompt:=3)
query = "select * from causecode where cause_code = test"
retcode = SQLExecQuery(connection, query)
During script execution it was included a data in database and now we want to validate this data. How to compare this data? How to know if the value included during the script execution is the same returned value in the SQL query?
Before using the SQLClose function, use the following function:
retcode = SQLRetrieve( connection , destarray)
Here destarray can be declared as
Dim destarray ( 1 To 5, 1 to 5 ) As Variant
The size of the destarray is based on rows and columns returned by your query. After this you can retrieve the value of particular location with the help of subscripts e.g.
varname = destarray (1,1)
Hope, this will help you.
A highly advanced bug is indistinguishable from a feature.
Thank you very much.
You help us a lot of.
iam using DB2 client as database can any one tell me how to have ODBC connectivity between database and robot...