Page 1 of 1

connection string for PHP and SQL2000 or access

Posted: Wed Apr 16, 2003 12:53 pm
by gotserv
I am looking for a connection string to use in perl as the hosting company I am with offers PHP on a windows 2000 server with only MSSQL or Access database support.

Does any one have any ideas?

thnx

jack

Posted: Thu Apr 17, 2003 6:15 pm
by lostboy
access
$connection = odbc_connect("accessdbname", "", "");
print "Connected to datasource<BR><BR>";

if ($result = odbc_exec($connection, "SELECT * FROM postcard"))
print "Command executed successfully<BR><BR>";
else
print "Error while executing command<BR><BR>";

mssql - see http://www.php.net/manual/en/ref.mssql.php