Cant connect with Informix and VB
Posted in 2000
Topics: Connectivity: ODBC / JDBC / .NET, Connectivity: ESQL/C, 4GL & Embedded SQL, Networking & sqlhosts Configuration
Here is my problem:
VB 5.0 SP3/ Cannot make connection to informix DB
Client/server environment
**********************************
a) PC with windows 95 and Windows NT 4.0
b) ODBC with informix ESQL/C for Win32 ver. 7.2
c) Server1 : HP with HP UX 10.20
Informix 7.30
d) Server2 : SUN with SUNOS 5.6 (solaris)
Informix 7.24
Problem:
****************
Make a connection to one server using the existing one to the other
server. As if the other server was the one making the connection.
Error:
*************
Informix error: -25553:
"Sqlhosts file not found or cannot be opened.
The sqlhosts file is required to determine information to establish
connection to a local or remote server. Create an sqlhosts file in the
directory $INFORMIXDIR/etc according to the format that the manual for
your database server product describes."
They defined the host file on the informix server, but the problem
still persists.
Connections through RDO.
Information gathered.
**************************
- Components and software versions who are used in the connections.
MSRDC20.ocx, MSRDC20.dll, MSRDC20.oca
- HW configuration of your server and clients
Clients
File c:\\Windows\\hosts with lines:
13.44.4.101 myprofin #Server1
13.44.3.36 pq_gdl #Server2
Servers
Server HP with HP UX ver. 10.20 Informix 7.30
File /etc/hosts with lines:
13.44.4.101 myprofin #Server1
13.44.3.36 pq_gdl #Server2
Server SUN with SUNOS ver.5.6 Informix ver. 7.24
- Small sample code that reproduces your problem.
strConnect = "ODBC;UID='" & "rep27" & "';PWD='" & "rep27" & "';
DB=sidecci;HOST=myprofin;SERV=sqlexec;SRVR=profin_tcp;PRO=onsoctcp"
Set en = rdoEngine.rdoEnvironments(0)
en.CursorDriver = rdUseOdbc
Set cn = en.OpenConnection(dsName:="rep27", Prompt =rdDriverComplete,
ReadOnly:=False, Connect:=strConnect)
strSQL = "SELECT * FROM pisameta@pisametatcp:cabezas"
Set rs_Gdl = cn.OpenResultset(Name:=strSQL, Type:=rdOpenDynamic,
LockType:=rdConcurReadOnly)
****** In this line is the problem **********
SQLHOSTS file
*********************
Clients:
C:\\program files\\informix\\etc\\sqlhosts
pisametatcp ontlitcp pq_gdl sqlexec (SUN server)
profin_tcp ontlitcp myprofin sqlexec (HP server)
HP Server
/home/informix/etc/sqlhosts
# Database Type_Conexion Host Service
profin_tcp onsoctcp myprofin sqlexec #(HP server)
pq_mtytcp onsoctcp pq_mty sqlexecpisametatcp onsoctcp pq_gdl sqlexec #(SUN server)
SUN Server
/home/informix/etc/sqlhosts
# Database Type_Conexion Host Service
pq_mtyshm onipcshm pq_mty onserv_1
pq_mtytcp ontlitcp pq_mty sqlexec
nxdev0_tcp ontlitcp nxdev0 sqlexec
data2tcp ontlitcp data2 onserver_2pisametatcp ontlitcp pq_gdl sqlexec #(SUN Server)
profin_tcp ontlitcp myprofin sqlexec #(HP Server)
* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!
Related threads
- Upgrade to 7.31.uc4, then error -25553?
- Re: Upgrade to 7.31.uc4, then error -25553?
- Re: Installation Question. Error :25553
- Re: Installation Question. Error :25553