Active Topics Memberlist Calendar Search Help | |
Register Login |
One Stop Testing Forum : Testing Tools @ OneStopTesting : QuickTest Pro @ OneStopTesting |
Topic: QTP Script to Insert Values Into Database Table |
|
Author | Message |
Mithi25
Senior Member Joined: 23Jun2009 Online Status: Offline Posts: 288 |
Topic: QTP Script to Insert Values Into Database Table Posted: 25Nov2009 at 10:40pm |
VBScript to insert values in database table.
We have table "EMP" in database "db"(Microsoft Access). EMP Table has following data in it. EMPNO EMPNAME EMPSAL 1 Lakshmi 30000 2 Laxmi 25000 3 Latha 15000 Dim con,rs set con= CreateObject( "ADODB.Connection") set rs =CreateObject("ADODB.Recordset") con.provider="microsoft.jet.oledb.4.0" con.open"d:\db.mdb" rs.open "insert into EMP(empno,empname,empsal) values(4,'Lakshmi',40000)",con msgbox("Inserted") Above script(code)will insert values in database table. Output: EMPNO EMPNAME EMPSAL 1 Lakshmi 30000 2 Laxmi 25000 3 Latha 15000 4 Lakshmi 40000 |
|
Post Resume: Click here to Upload your Resume & Apply for Jobs |
|
IP Logged | |
Forum Jump |
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
© Vyom Technosoft Pvt. Ltd. All Rights Reserved.