[PHP-DB] Problems with ODBC connectivity

2002-10-29 Thread Bill Hudspeth
I have developed a PHP application that accesses a Microsoft Access database
through ODBC. The application works well using PHP version 4.1. I have
recently installed the newest version of PHP (4.2.3) on another machine
running NT4, and IIS 4.
Again, I am using an ODBC connection, and have given this connection the
same name, login, and password as is present in my PHP files. While the PHP
module is running fine, I cannot retrieve records from the database,
probably indicating a problem with my connectivity to the ODBC. Again, I
have made the same settings in the new ODBC entry as is present on the
development machine. Could there be a version problem with the PHP module?
Any other suggestions would be greatly appreciated.

Thanks, Bill



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Multiple outer joins submitted via ODBC driver to MS Access??

2002-08-29 Thread Bill Hudspeth

I am using PHP 4.1 with the ODBC driver on MS Windows 2000, running IIS. I
am trying to submit a SQL statement with multiple outer joins to a MS Access
database. Does anyone know the syntax for creating such MULTIPLE outer
joins? As it is, my current SQL statement drops rows for which certain
columns have NULL values. Thanks, Bill.
My current, inner join syntax is:

$class_query = SELECT sample.Sample, type.type_name, chon_class.class_name,
chon_group.groupname, brecciation.brec_type
FROM sample,type,chon_class,chon_group,brecciation

WHERE sample.type = type.type
AND sample.chon_class = chon_class.chon_class
AND sample.chon_group = chon_group.chon_group
AND sample.brecciation = brecciation.brecciation

AND sample.type=$met_type
AND chon_class.class_name LIKE '%$chondritic_class%'

ORDER BY chon_group.groupname,brecciation.brec_type;




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Connecting to MS Access

2002-06-12 Thread Bill Hudspeth

I am having problems connecting to an Access database. I am using Windows
2000, IIS 4, Access 2000, and PHP 4.2.1. I have created a system DSN using
the Access (.mdb) driver, and have a username and password. What's going
on?? Thanks, Bill



The code I have used is as follows:







?php



//connect to database

$connectionstring = odbc_connect(meteoritecatalog, username,
password);

//line 14 is immediately above



//SQL Query

$query = SELECT sample, type FROM sample;



//execute query

$queryexe = odbc_do($connectionstring, $query);

//line 20 above



//output results to standard output

odbc_result_all($queryexe, BORDER=1);

//line 23 above



//disconnect from the database

odbc_close($connectionstring);

//line 26 above



?





The error message I get is:



Warning: SQL error: [Microsoft][ODBC Microsoft Access Driver]General error
Not enough information to connect to this DSN with SQLConnect. Use
SQLDriverConnect., SQL state S1000 in SQLConnect in
C:\inetpub\wwwroot\PHP\data_tap.php on line 14

Warning: odbc_do(): supplied argument is not a valid ODBC-Link resource in
C:\inetpub\wwwroot\PHP\data_tap.php on line 20

Warning: odbc_result_all(): supplied argument is not a valid ODBC result
resource in C:\inetpub\wwwroot\PHP\data_tap.php on line 23

Warning: odbc_close(): supplied argument is not a valid ODBC-Link resource
in C:\inetpub\wwwroot\PHP\data_tap.php on line 26








-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php