Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DSN-less connection from VFP6 to Informix under UNIX
Message
From
12/12/2001 22:29:09
Wilfred Chan
Bnp Paribas Hong Kong Branch
Hong Kong, Hong Kong
 
 
To
12/12/2001 04:11:09
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00593135
Message ID:
00593688
Views:
23
Hi,

First, just explain the fields in Informix connection:
1) SERV=service, it's the name where it must be exist in local PC \etc\services
e.g. infx_db 1526/tcp
2) SRVR=server, it's defined in Informix DB $INFORMIXDIR/etc/sqlhosts
e.g. infx_server sesoctcp {hostname} {services, here->infx_db}
3) PRO=protocol, usually olsoctcp/sesoctcp if a TCP/IP enabled network. Here ol is Online, se is Stardand Engine

Also, if you are using Informix SE (otherwise I don't know), please check the DBPATH in setnet32. It should be equal to the DBPATH in the Unix server setting.

Then, the sqlexecd daemon has to be started by root.
e.g. sqlexecd [server, here->infx_server]

Next, connect with ADODB object in VFP
e.g.
sconn="DRIVER={.... 32 BIT INFORMIX9};UID=x;PWD=x;SRVR=infx_server;HOST=172....;DB=x;SERV=infx_db;PRO=sesoctcp"
oc=createobject('adodb.connection')
oc.open(sconn)
orec=createobject('adodb.recordset')
orec.open('select * from test',oc)
?orec.fields(...).value

Also, DSN-less connection can be applied with ODBC connection. I think it's easier then ADO.

P.S. I hope you didn't tell us the real user ID and password, etc.. If so, .... you know what to do.
:) Wilfred

>Hello there,
>
>Once here, I was trying to get answer on similar query but with small success. Near my back is one old SCO UNIX sever with Informix database. He is out of normal daily using, but sometime we need an reports and data. In most cases, I can get all data using build-in tool "dbaccess" and fistfull of prepared SQL queries but, so received data are in raw format and uggly for presentation. One of good solutions was connection over ODBC (Informix-CLI 2.5 32 bit and Informix 3.33 32 bit) and this working fine using VFP for short time. Some changes was done on this server and connection node on server side for this type of connection has been removed. As I have still all neccessary information about data server (IP address, hostname, name of database, root and database adiminstrator privilegions...) I'm interested to know is possible using on such server so called DSN-less connection from VFP6 to this server without installed OLE DB side on server. Every day I trying to make this using this
>syntax and different variations (I don't know what is SERV=1984):
>*
>conn.Provider = "MSDASQL.1"
>conn.ConnectionString = "UID=admin;PWD=summer96;DB=billing;"
>conn.ConnectionString =conn.ConnectionString +"HOST=193.0.0.6;SRVR=old_server;SERV=1984;"
>conn.ConnectionString =conn.ConnectionString +"PRO=olsoctcp;Driver={INFORMIX 3.33 32 BIT};DSN='';"
>but without result, still an error in connections string.
>Anybody has solution !? Thanks in advance.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform