Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem with Multiple rows retrieval from mySQL and save it some variable
#1
Scenario:
Code:
SELECT param.parameter_name, op.parameter_value FROM t_automation_parameters AS param, t_automation_op AS op WHERE op.parameter_id = param.parameter_id AND op.order_id = (received_order_id)

Need to use the above query for mysql db which wud give me multiple rows and 2 columns. A key value kind of pairing.

e.g. Key”Manu”, Value”123456789”
Key”Adi”, Value”987654321”

I need to store it some variables but the key value pairing shud be intact and den wud work on the data and again need to update them in the DB.
Reply
#2
Use Dictionary objects.
Code:
set objGeneralDictionary=CreateObject("Scripting.Dictionary") objGeneralDictionary.Add "Item", "Key"
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Not able to click the save button in Save As window while downloading from SAP kathirvelnagaraj 0 2,855 08-25-2015, 07:37 PM
Last Post: kathirvelnagaraj
  How to Delete Rows with duplicate values in 1 columns in excel thru QTP. arpan 0 3,215 02-09-2015, 08:47 PM
Last Post: arpan
  How to get center data value in a odd number of rows and columns web table ... sai rajesh 0 3,235 11-13-2013, 10:24 PM
Last Post: sai rajesh
  Read text from text file and save it into a variable in qtp arpan 3 14,120 06-19-2013, 08:34 PM
Last Post: arpan
  to count the number of used rows in a particular column sujaravi123 3 11,841 06-12-2013, 03:17 PM
Last Post: sujaravi123

Forum Jump:


Users browsing this thread: 1 Guest(s)