try $conn = odbc_connection("D3_ODBC","","");not blanks but empty strings
bastien
From: "Greg Jackson" <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Subject: [PHP-DB] odbc_connect() parameters help please Date: Thu, 16 Dec 2004 17:55:59 +1300
Hi
I'm new to this group, but not to PHP :-)
Does anybody know why odbc_connect() requires a username and password to be
supplied as well as the DSN name? This feature is preventing me from
accessing a database that can easily be accessed from asp with the following
example code:
<% set conn=Server.CreateObject("ADODB.Connection") conn.Open"D3_ODBC" set rs=Server.CreateObject("ADODB.recordset") rs.Open "select field1,field2 from tble where field3 like '%search%'", conn do until rs.EOF for each x in rs.Fields Response.Write(x.name) Response.Write(" = ") Response.Write(x.value & "<br />") next Response.Write("<br />") rs.MoveNext loop rs.Close conn.Close %>
Second line of above code: conn.Open"D3_ODBC" Note that no user or password needs to be supplied.
For this particular ODBC driver (D3ODBC from Raining Data) there are in fact
two sets of user/password parameters specified in the DSN i.e. all four
fields of logon info must be supplied correctly on order to connect.
I have tried all possible combinations with odbc_connect() (including
blanks) in case it simply overrides a couple of the four fields in the DSN.
Nothing works. There is network activity during the connection call and the
error message from the driver is the same as when you get the password wrong
from something like MSACCESS.
Does anybody know of a way around this limitation?
Best regards, Greg Jackson
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
