Posts: 146
Threads: 50
Joined: Dec 2008
Reputation:
1
12-22-2008, 05:23 PM
I connect to database by code and imported data and placed in fields of application and validate some functionalities.... no problem up to here... when QTP tries to import second record from database... it is importing first record again... Can I know my mistake...?
Posts: 1,105
Threads: 18
Joined: Jan 2008
Reputation:
8
12-22-2008, 11:35 PM
Put your properly formatted code here.
Posts: 146
Threads: 50
Joined: Dec 2008
Reputation:
1
02-12-2009, 05:28 PM
as part of your code is correct........
check once you get a value from database whether it is retrieved from there or not....
use msgbox pwd
it will show whethet value has been retrieved or not... If it is not? I hope no chance because database has been already connected and got a Login_name,
check the column name is pwd or something else...
"Easy method to connect to any database" --> open new text file and save as "babaDB.udl"
one icon will appear at the text file location, double click on that and select your desired database and provide the user name password... navigation would be very simple, you can understand easily... give the info what it asks and close it...
Right click on that icon and open with "Note Pad"...
copy the available text and keep it in your code at the place of
con.open "copied text here"
'use it if you feel difficult to remember all the server,localhost, username, password... etc.,
;D
Posts: 77
Threads: 31
Joined: Jan 2009
Reputation:
0
02-13-2009, 11:32 AM
Hi bfakruddin ,
I placed 'msgbox pwd' , and its showing 'mercury'. it means it is getting properly.
But i think while inserting it is inserting something else.
What i guess is it is inserting ( space ) as extra string.Bcoz Login wondow says, Incorrect password.I also observed the extra element.
as for mercury(*******) there should be only 7 asterstiks. But what i observed is (********) i.e eight.
Even check that while Agent Name get inserted observe the Position of cursor,it is on the last position of that field.
I guess same thing may be happen for Password also.
What You say, if it , its real challange!
I stll not tried your second method,but first trying the first one.
Lets see....will get back you soon if solved.
Posts: 77
Threads: 31
Joined: Jan 2009
Reputation:
0
02-16-2009, 12:07 PM
Yes ! now it works. Thanks.
Can you please give me such built in function used in QTP ?
Or where i can found so that i can use them whereever necessay.