Exforsys

Online Training

QTP: How do you assign a parameter in the Global DataTable into a Variable in QTP?

This is a discussion on QTP: How do you assign a parameter in the Global DataTable into a Variable in QTP? within the Software Testing forums, part of the Testing category; Hi everyone. I am trying to assign one of the parameters from my datatable into a Variable. Currently, I am ...


Go Back   Exforsys > Testing > Software Testing

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 12-20-2007, 08:25 PM
Junior Member
 
Join Date: Dec 2007
Posts: 2
abuzzi is on a distinguished road
Exclamation QTP: How do you assign a parameter in the Global DataTable into a Variable in QTP?

Hi everyone.

I am trying to assign one of the parameters from my datatable into a Variable.

Currently, I am attempting this by using the following syntax;

Dim InvestTp
Set InvestTp = DataTable("Initial_Investment_Tp", dtGlobalSheet)

- however this is returning the error: "Object required: '[string: "1"]'

Can anyone help me out by stepping me through the syntax needed to convert the value in my datatable into a variable?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-04-2008, 08:11 AM
Junior Member
 
Join Date: Jul 2007
Posts: 13
sussain is on a distinguished road
Hi,

Try like this...

Actually, as per my knowledge, we dont use "SET" before the variables to which a value from datable is assigned.
Try to assign that without using "Set"
like
InvestTP=DataTable("Initial_Investment_TP",dtGlobalsheet)

I am sure it works.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 07-04-2008, 03:11 PM
Junior Member
 
Join Date: Apr 2008
Posts: 8
sukanya_QTP is on a distinguished road
Quote:
Originally Posted by abuzzi View Post
Hi everyone.

I am trying to assign one of the parameters from my datatable into a Variable.

Currently, I am attempting this by using the following syntax;

Dim InvestTp
Set InvestTp = DataTable("Initial_Investment_Tp", dtGlobalSheet)

- however this is returning the error: "Object required: '[string: "1"]'

Can anyone help me out by stepping me through the syntax needed to convert the value in my datatable into a variable?
this is VB scripting and u don have to say set there
InvestTp = DataTable("Initial_Investment_Tp", Global)
this wud take value from the Initial_Investment_Tp column and put it in InvestTp
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads

Thread Thread Starter Forum Replies Last Post
Store value in a global variable Ketsuki C and C++ 3 05-11-2007 09:20 AM
comp.lang.c Answers (Abridged) to Frequently Asked Questions (FAQ) Steve Summit Tech FAQ 0 06-15-2004 07:00 AM
comp.lang.c Answers (Abridged) to Frequently Asked Questions (FAQ) Steve Summit Tech FAQ 0 06-01-2004 07:01 AM
comp.lang.c Answers to Frequently Asked Questions (FAQ List) Steve Summit Tech FAQ 0 06-01-2004 07:00 AM
comp.lang.c Answers (Abridged) to Frequently Asked Questions (FAQ) Steve Summit Tech FAQ 0 05-15-2004 07:00 AM


All times are GMT -4. The time now is 11:50 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2004 - 2007 Exforsys Inc. All rights reserved.