Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QTP Database conenction and parameterization of the values
#31
Solved: 11 Years, 4 Months, 1 Week ago
Dear Siri,

This is the Code...Hope it works out for you..
I tested my version on my PC By using different table...
Let me know the result....



Code:
Set Conn = CreateObject("ADODB.Connection")
Conn.ConnectionString = ("DSN=devmitg;username=xxx;password=yyy;")
Conn.Open
Set rs = Conn.Execute("Select Code, Meaning From TB_AMS052_Codes Where Code_Nam = 'Pole' ")

For each fields in rs.fields
DataTable.GlobalSheet.AddParameter fields.name , ""
Next
rs.MoveFirst

iRow = 1
Do
       DataTable.SetCurrentRow iRow
       DataTable("Code",dtGlobalSheet) = rs.fields("Code")
       DataTable("Meaning",dtGlobalSheet) = rs.fields("Meaning")
       iRow = iRow + 1
       rs.MoveNext
loop until rs.EOF
    

Conn.close

Set Conn = Nothing
Set Rs = Nothing
Reply


Messages In This Thread

Possibly Related Threads…
Thread Author Replies Views Last Post
  Action Parameterization Issue Slothman 1 1,974 10-31-2020, 01:05 PM
Last Post: Ankur
  Business Components Parameterization YogeshCallappa 0 1,633 06-07-2017, 04:32 PM
Last Post: YogeshCallappa
  Parameterization Hanskanika 0 1,651 11-20-2015, 04:45 PM
Last Post: Hanskanika
  QTP database seach siitohan 1 2,569 02-19-2013, 07:07 AM
Last Post: basanth27
  QTP 11.5 PARAMETERIZATION ERROR QTP(UFT)11.50 mseroney88 2 3,657 01-22-2013, 10:51 AM
Last Post: mseroney88

Forum Jump:


Users browsing this thread: 1 Guest(s)