Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Database connection - TNS error
#3
Solved: 10 Years, 9 Months ago
I am using below and i am able to getdata from oracle.we need to have oracle installed in the machine to run this

Code:
Dim sDataSource
sDataSource = envDBInstance
Dim strConnection, oDbConn, rs, strSQL
    
strConnection = "Provider=OraOLEDB.Oracle;Data Source=" & sDataSource & ";User Id=user;Password=password;"

on Error Resume Next

    Set oDbConn = CreateObject("ADODB.Connection")
    oDbConn.Open strConnection
    
     Set oResultSet = CreateObject("ADODB.recordset")
    oResultSet.open sQuery, oDbConn, 3,3
Reply


Messages In This Thread
Database connection - TNS error - by Shwetha - 05-20-2011, 08:25 PM
RE: Database connection - TNS error - by surya_7mar - 05-24-2011, 02:27 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Connection to oracle using JDBC and QTP dileep45 0 3,304 07-30-2013, 06:39 PM
Last Post: dileep45
Question DB connection string issue jackmartins 2 5,807 07-05-2013, 02:47 PM
Last Post: Staff
  Remote Database connection through QTP PrabhatN 4 7,609 12-02-2010, 12:53 PM
Last Post: cdesserich
  mapping database user to database kamalteja 4 4,473 11-03-2010, 11:58 AM
Last Post: kamalteja
  jboss console connection debo 0 1,881 05-15-2008, 06:42 PM
Last Post: debo

Forum Jump:


Users browsing this thread: 1 Guest(s)