Interview Questions   Tutorials   Discussions   Programs   Videos   

QTP - How to get the column count and column name from the result set in the database connection program?




340
views
asked marvit August 21, 2014 06:23 AM  

How to get the column count and column name from the result set in the database connection program?


           

1 Answers



 
answered By Dharma   0  
example for recordcount
Set dbconn=createobject("adodb.connection")dbconn.open "dsn=xxx"
Set objRecordset=createobject("ADODB.Recordset")   objRecordset.open "select * from logintable",dbconn,1,3   msgbox objRecordset.recordcount


for field namesFor each x in objRecordset.fields  msgbox (x.name)Next
flag   
   add comment

Your answer

Join with account you already have

FF

Preview


Ready to start your tutorial with us? That's great! Send us an email and we will get back to you as soon as possible!

Alert