Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. sponsors. rss.
 From: Anders Altberg
  Where is Anders Altberg?
 Uppsala
 Sweden
 Anders Altberg
 To: Shehzad Khan
  Where is Shehzad Khan?
 Mum
 India
 Shehzad Khan
 Tags
Subject: RE: TNS less Oracle Connection
Thread ID: 181442 Message ID: 181453 # Views: 53 # Ratings: 0
Version: Visual FoxPro 6 Category: ODBC, ADO and OLEDB
Date: Thursday, July 03, 2008 11:28:34 AM         
   


> Hello,
> Freinds
>
> I want to create a TNS-Less Oracle Connection from VFP
> i.e without creating orcale ServiceName in User Machine
>
> I have tried but it is not working
>
> ?SQLSTRINGCONNECT("Provider=MSDASQL.1;Data Source=(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.10.10)(PORT = 1527)))(CONNECT_DATA =(SERVICE_NAME = ORADbc)));User Id=username;Password=pass;")
>
> Shehzad Khan

Hi Shehzad,

Your connectionstring is for OLE DB, not for ODBC. The SQL.. functions all expect an ODBC handle.
You can use the string you have to make an OLEDB connection.

oConn=CreateObject('ADODB.Connedction')
oConn.ConnectionString="Provider=MSDASQL.1;Data Source= and so on...."
oConn.Open


The CursorAdapter class in VFP is particularly well suited to handle this type of connection.

For an ODBC connectionstring for Oracle, see www.connectionstrings.com

-Anders



COMPLETE THREAD
TNS less Oracle Connection Posted by Shehzad Khan @ 7/3/2008 10:07:19 AM
RE: TNS less Oracle Connection Posted by Anders Altberg @ 7/3/2008 11:28:34 AM
RE: TNS less Oracle Connection Posted by Cetin Basoz @ 7/3/2008 11:30:04 AM
RE: TNS less Oracle Connection Posted by Andy Kramek @ 7/3/2008 12:46:05 PM
RE: TNS less Oracle Connection Posted by Pete Sass @ 7/3/2008 4:47:50 PM
RE: TNS less Oracle Connection Posted by Shehzad Khan @ 7/4/2008 3:25:18 PM
RE: TNS less Oracle Connection Posted by Anders Altberg @ 7/4/2008 6:31:45 PM
RE: TNS less Oracle Connection Posted by Shehzad Khan @ 7/5/2008 9:33:26 AM
RE: TNS less Oracle Connection Posted by Anders Altberg @ 7/3/2008 7:57:20 PM
RE: TNS less Oracle Connection Posted by Shehzad Khan @ 12/3/2008 12:26:12 PM