Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Exporting QTP runtime datatable to SQL server during
#2
Not Solved
Its possible. given the Update access previlages to your DB.
i dont have sample code.
bt u can do this in similar way how you caonnect to the DB and query the DB


U can write a update query and execute it.

Thanks
Sonu
Code:
Function db_connect( strSQL )
        Set o_CON =CreateObject("ADODB.Command")
        Set o_RS= CreateObject("ADODB.RecordSet")
        serverName =  Left(Environment.Value("LocalHostName"), 4)&"svr"'Inputbox("Enter the DB server Name")
        If Trim( serverName)  ="" Then
            's_ConnectionString =  "dsn=" & "yourDB"
            serverName ="yourdbserver"
            s_ConnectionString ="driver=sql server;server="& serverName  &";database=yourDB;uid=yourdbuserid;pwd=yourpassword*"
        Else
         s_ConnectionString ="driver=sql server;server="& serverName  &";database=yourDB;uid=yourdbuserid;pwd=yourpassword*"
        End If
        
        o_CON.ActiveConnection = s_ConnectionString
        o_CON.CommandText= strSQL
        Set o_RS =o_CON.Execute
        Set db_connect = o_RS
End Function
Reply


Messages In This Thread
RE: Exporting QTP runtime datatable to SQL server during - by sria123 - 05-10-2013, 03:41 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  SQL Query Issue in QTP rajiv.qtp 1 2,294 11-28-2013, 10:36 AM
Last Post: Jay
  Does QTP support writing runtime data to multiple sheets in excel Shwethareddy 2 3,558 10-16-2012, 12:20 PM
Last Post: Shwethareddy
  Coloring cell of runtime datatable indranilgoswamimcb 3 10,677 08-03-2012, 03:51 PM
Last Post: SteveS
  SQL on oracle database doesn't return a value Bluefields 2 3,071 07-09-2012, 01:23 PM
Last Post: Bluefields
  Exporting datatable Sivapratha 1 2,919 04-08-2011, 07:37 PM
Last Post: basanth27

Forum Jump:


Users browsing this thread: 1 Guest(s)