Using ODBC with Informix
| From: | Mariusz Topczewski | Date: | Thu, 07 Sep 2000 05:42:54 +0000 |
| Subject: | Using ODBC with Informix | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-2486@lists.php.net to get a copy of this message | ||
Hi!
I instaled Informix Client 2.5 on Win2000 Professional. I added an user and
system DSN in ControlPanel -> ODBC Administrator (I translate the names
from polish, so sorry for all mistake, my english isn't so well :-((( ) In
configuration I have entries:
Data Source Name: in01i1biaobia5
Description: Informix 5.1
Database name: insurek98
In Advance I have:
Database list: insurek98
Default user name: insurer
Host name: 192.1.0.1
Servicename: star
Servername: in01i1biaobia5
Protocol type: olsoctcp
Cursor behavior: 0-close
Enable scrollable cursor: 0-disable
Get DB List from Informix: 1-Yes
With this configuration I can import a table from by database insurek98 to
MS Access on my local machine (Informix is in on AIX machine, 192.1.0.1,
in01i1biaobia5.in.bianet.com.pl. This is on intranet, the IP addreses are
routable, the net has no connection with internet.)
I try execute SQL query on this database, using Web server from Win2000
(IIS5) with PHP 4pl2 installed on it. I try in this way:
<?
print("\n<HTML>");
print("\n<HEAD>");
print("\n\t<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html;
charset=iso-8859-2\">");
print("\n\t<TITLE>Lista pośredników</TITLE>");
print("\n</HEAD>");
print("\n<BODY>\n\n");
$connection = odbc_connect("in01i1biaobia5",
"insurer","here_is_user_insurer_password"); <-------- this is line 9
if (!$connection) print("Error");
else print("OK!");
print("\n</BODY>");
print("\n</HTML>");
?>
The result on Web page is:
Warning: SQL error: [INTERSOLV][ODBC Informix driver][Informix]Unable to
load locale categories., SQL state S1000 in SQLConnect in C:\Moje Dokumenty
2\Skrypty PHP\posrednicy.php on line 9
Error
Could you help me?
Regards,
Mariusz