RE: [PHP-DB] odbc functions

From: Date: Mon, 04 Feb 2002 15:50:03 +0000
Subject: RE: [PHP-DB] odbc functions
References: 1  Groups: php.db php.general php.windows 
Request: Send a blank email to php-db+get-16490@lists.php.net to get a copy of this message
Richard, Simple example using MS SQL Server: <?php $dsn="Northwind"; $usr="sa"; $pwd=""; $qual="Northwind"; $owner="dbo"; $table="Orders"; $conn_id = odbc_connect($dsn, $usr, $pwd) or die (odbc_error()); $result_id = odbc_primarykeys($conn_id, $qual, $owner, $table) or die (odbc_error()); odbc_result_all($result_id); ?> Best regards, Andrew Hill Director of Technology Evangelism OpenLink Software http://www.openlinksw.com Universal Data Access & Data Integration Technology Providers > -----Original Message----- > From: Richard Black [mailto:rblack@datavisibility.co.uk] > Sent: Monday, February 04, 2002 10:36 AM > To: 'php-general@lists.php.net' > Cc: 'php-db@lists.php.net'; 'php-windows@lists.php.net' > Subject: [PHP-DB] odbc functions > > > Does anyone have experience of using odbc_primarykeys??? > > I'm writing a script to let me port a database from Access to > MySQL without > having to write all the table definitions by hand. But I can't get > odbc_primarykeys to work - it comes back with: > > Warning: SQL error: , SQL state 00000 in SQLPrimaryKeys > > I don't really know what the modifier and owner parameters should do, and > suspect thats where the problem lies. I tried them as "", "%" and " > ". > > Running PHP 4.0.4 on NT 4.0 Workstation, with Access 97 > > Richy. > > > ========================================== > Richard Black > Systems Programmer, DataVisibility Ltd - > http://www.datavisibility.com > Tel: 0141 435 3504 > Email: rblack@datavisibility.co.uk > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > >

« previous php.db (#16490) next »