This article describes two practical methods for connecting to the Informix Database in Linux in Windows: Using myeclipse to directly connect to the Informix database and using ODBC to connect to the Informix database.
The development materials used in the project mainly include:
System development environment: Windows + linux
Windows software development: myeclipse5.5 + IBM Informix Client-SDK 2.90 + flashfxp
Linux software: informix11 Database
Related Technologies: JSP + Struts + JavaBean + Informix
Method 1: myeclipse directly connects to the Informix Database
The prepared files include: D:/ifxjdbc. jar.
Procedure: "Start" -- "All Programs" -- "myeclipse 5.5" -- "Windows" -- "Open perspctive" -- "My eclipse Database Explorer" Open the DB browser form, right-click "new" to create a database connection
Driver name: Custom connection ID (for example, Informix. JDBC. ifxdriver)
Nnection URL: JDBC: Informix-sqli: // 192.168.1.249: 9000/databasename: informixserver = informixservername; newcodeset = GBK, 8859-1,819
User name: Informix
Password: Informix
Driver jars: D:/ifjdbc. Jar
192.168.1.249 is the IP address of the Linux server, databasename is the database name of the Linux server, and informixservername is the database service name of the Linux server.
Method 2: ODBC connection to Informix Database
1. install IBM Informix Client-SDK 2.90.
2. Open Control Panel-Data Source (ODBC)-create a new system DSN and set it as follows:
Server Name: Informix Server
Host Name: 192.168.1.249
Service: sqlexecl
Protocol: onsoctcp
Options:
Database Name: databasename
User ID: Informix User Name
Password: Informix Password
3. Set Windows file service content
C:/Windows/system32/Drivers/etc/service
Man 9535/tcp # remote man Server
SQL lexecl 9003/tcp # remote Linux INFORMIX Data Server
3. Set the Windows system file hosts content
C:/Windows/system32/Drivers/etc/hosts
127.0.0.1 localhost
192.168.1.249 linuxmachinename