data inserting problem
| From: | qt | Date: | Thu, 30 Jan 2003 20:24:44 +0000 |
| Subject: | data inserting problem | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-25274@lists.php.net to get a copy of this message | ||
Dear Sirs,
I am using following script to insert data into ms access data with php
script
$UserName = "ara";
$Password = "123456";
$conn = new COM("ADODB.Connection") or die("Cannot start ADO");
// Microsoft Access connection string.
$conn->Open("DRIVER={Microsoft Access Driver (*.mdb)};
DBQ=C:\\Xitami\\webpages\\sig.mdb");
$sql = "INSERT INTO Users (UserName,Password) values ("
.$conn->qstr($UserName).',' //line 20
.$conn->qstr($Password).")"; //line 21
$conn->Execute($sql);
But I am getting following error;
-------
Warning: (null)(): Invoke() failed: Exception occurred. Source:
ADODB.Connection Description: Arguments are of the wrong type, are out of
acceptable range, or are in conflict with one another. in
C:\XITAMI\webpages\php\temp\AddData.php on line 20
Warning: (null)(): Invoke() failed: Exception occurred. Source:
ADODB.Connection Description: Arguments are of the wrong type, are out of
acceptable range, or are in conflict with one another. in
C:\XITAMI\webpages\php\temp\AddData.php on line 21
Warning: (null)(): Invoke() failed: Exception occurred. Source: Microsoft
OLE DB Provider for ODBC Drivers Description: [Microsoft][ODBC Microsoft
Access Driver] Syntax error in INSERT INTO statement. in
C:\XITAMI\webpages\php\temp\AddData.php on line 22
-------
What do I need to do? I presuate any web source which is explaining ms
access data handling
Best Regards