> 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