ok - I have no idea what's doing on. In a nutshell I am doing a SQL
insert in a Access database from PHP but am getting an error.
Here is the code:
// PHP db connection
$db = 'C:\\Phpweb\\go vDB.mdb';
$conn = new COM('ADODB.Conn ection');
$conn->Open("Provider =Microsoft.Jet. OLEDB.4.0; Data Source=$db");
and here is the error:
Warning: (null)(): Invoke() failed: Exception occurred. Source:
Microsoft JET Database Engine Description: Syntax error in INSERT INTO
statement. in c:\phpweb\detai lcard.php on line 198
and here is a print out of the sql:
INSERT INTO Cards(active,co mpanynam,divisi on,streetnumb,s treet,town_city ,province,filet itle,air,water, sewage,pttw,par tVIII,part46,mi scellany,grr,gr rfile)
VALUES ('0','1 HOUR PHOTO PLUS','ob','24' ,'RAMBLER
DRIVE','BRAMPTO N','Ontario','S I HP BR RA','0','0','0' ,'0','0','0','R EG
347 - 1592500','15925 00','700')
the sql works if I do a query in Access.....
please help me out...I'm losing my mind!
Thanks!
insert in a Access database from PHP but am getting an error.
Here is the code:
// PHP db connection
$db = 'C:\\Phpweb\\go vDB.mdb';
$conn = new COM('ADODB.Conn ection');
$conn->Open("Provider =Microsoft.Jet. OLEDB.4.0; Data Source=$db");
and here is the error:
Warning: (null)(): Invoke() failed: Exception occurred. Source:
Microsoft JET Database Engine Description: Syntax error in INSERT INTO
statement. in c:\phpweb\detai lcard.php on line 198
and here is a print out of the sql:
INSERT INTO Cards(active,co mpanynam,divisi on,streetnumb,s treet,town_city ,province,filet itle,air,water, sewage,pttw,par tVIII,part46,mi scellany,grr,gr rfile)
VALUES ('0','1 HOUR PHOTO PLUS','ob','24' ,'RAMBLER
DRIVE','BRAMPTO N','Ontario','S I HP BR RA','0','0','0' ,'0','0','0','R EG
347 - 1592500','15925 00','700')
the sql works if I do a query in Access.....
please help me out...I'm losing my mind!
Thanks!
Comment