Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QTP Database conenction and parameterization of the values
#9
Solved: 11 Years, 4 Months ago
Code:
Set Conn = CreateObject("ADODB.Connection")
Set Rs = CreateObject("ADODB.recordset")

Conn.Open("DSN=devtest ,username=xxx,password=yyy")
sql = "Select Code, Meaning From TB_AMS052_Codes Where Code_Nam = Pole"
Rs.CursorType = 1 'set to a Keyset cursor type’

Rs.Open sql,Conn
Recordcount = Rs.RecordCount

DataTable.GlobalSheet.AddParameter "Meaning",""
While(NOT Rs.EOF)
'Msgbox Rs.Fields("Meaning")
For i=1 to Recordcount
DataTable.SetCurrentRow(i)
DataTable("Meaning",DtGlobalSheet) = Rs.Fields("Meaning")
Rs.MoveNext
Next

wend
DataTable.Export "C:\DatabaseExample.xls"
Conn.close
Set Conn = Nothing
Set Rs = Nothing

This is the script an error saying that the not able to connect to database .Can you tell me the format for connect string for oracle
I need the sequence for the connstrng
Reply


Messages In This Thread
RE: QTP Database conenction and parameterization of the values - by siri - 07-24-2008, 02:30 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Action Parameterization Issue Slothman 1 1,970 10-31-2020, 01:05 PM
Last Post: Ankur
  Business Components Parameterization YogeshCallappa 0 1,628 06-07-2017, 04:32 PM
Last Post: YogeshCallappa
  Parameterization Hanskanika 0 1,650 11-20-2015, 04:45 PM
Last Post: Hanskanika
  QTP database seach siitohan 1 2,564 02-19-2013, 07:07 AM
Last Post: basanth27
  QTP 11.5 PARAMETERIZATION ERROR QTP(UFT)11.50 mseroney88 2 3,652 01-22-2013, 10:51 AM
Last Post: mseroney88

Forum Jump:


Users browsing this thread: 16 Guest(s)