Results 1 to 3 of 3
  1. #1

    Unable to make database connection


    I am a newbie to QTP. Couldn't find a definite answer in previous posts.
    I was able to connect to database and run my script till yesterday. Today password changed and I am not able to make the connection.
    This is what I am doing-

    Set oConnection = CreateObject("ADODB.connection")

    oConnection.Open "Driver={Microsoft ODBC for Oracle};" & "Server=XYZ;" & "Uid=xyz;" & "Pwd=xyz;"

    Set oRecordSet = CreateObject("ADODB.recordset")

    sql1="SELECT * FROM XTABLE where EMP=100"

    oRecordSet.Open sql1, oConnection

    msgbox oConnection.State

    it always gives me 0

    Can someone guide me where I am going wrong?

  2. #2

    Re: Unable to make database connection

    I hope you have not used "on error resume next"?

  3. #3

    Re: Unable to make database connection

    Set Conn = CreateObject("ADODB.Connection")

    Conn.ConnectionString = "Driver={Oracle in OraClient10g_home1};Dbq=databasename;Uid=wasadmin; Pwd=wasadmin;"


    MsgBox Conn.State


    Set Conn = Nothing



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
BetaSoft Inc.
All times are GMT -8. The time now is 06:01 PM.

Copyright BetaSoft Inc.