Micro Focus QTP (UFT) Forums
SQL on oracle database doesn't return a value - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: SQL on oracle database doesn't return a value (/Thread-SQL-on-oracle-database-doesn-t-return-a-value)



SQL on oracle database doesn't return a value - Bluefields - 06-27-2012

Hey there,

I'm using this SQL script in my QTP script, to retrieve a single value:

Code:
process_id_t1=db.execute("select id from ld_process_type where process_type in ('D2')")

The SQL script is OK, but the value doesn't get assigned to the QTP internal variable "process_id_t1". Is anything wrong with the syntax?

Thx and regards,
Roland


RE: SQL on oracle database doesn't return a value - Shridevi.Salagare - 07-03-2012

Hi,
Have you checked the connetion string whether its proper?

When I use the query to get output ..I generally create a ADODB record set and ADODB connection object and capture the output in it.



RE: SQL on oracle database doesn't return a value - Bluefields - 07-09-2012

Hey,

the connection string is OK, I created a ADODB record set and connection object too. The funny thing is, it's not a problem to write any data to the database, just getting the output doesn't work.

Can you please post the ADODB record set and connection object which you're using?

Thx and regards,
Roland