- Sun Feb 26, 2017 7:07 pm
#789396
Hi everyone,
we are currently trying to integrate an ms access database into one of our workflows. We use PHP PDO for database connection. Which works perfectly fine for SQL select / update / drop table. However 'insert into' does not work. At first it seems like everything did work but no data is written in the database. Unfortunately there is no error message displayed in PM / written into the php error log. Using the below SQL statement within the ms access client works fine and as intended .
Any idea how to make this work? I appreciate any help you can provide
best regards
Sicilio
we are currently trying to integrate an ms access database into one of our workflows. We use PHP PDO for database connection. Which works perfectly fine for SQL select / update / drop table. However 'insert into' does not work. At first it seems like everything did work but no data is written in the database. Unfortunately there is no error message displayed in PM / written into the php error log. Using the below SQL statement within the ms access client works fine and as intended .
Any idea how to make this work? I appreciate any help you can provide
Code: Select all
// create PDO
$dbName = $_SERVER["DOCUMENT_ROOT"] . "\test_DB.mdb";
$conn = new PDO("odbc:Driver={Microsoft Access Driver (*.mdb, *.accdb)};Dbq=".$dbName.";Uid=; Pwd=;");
// actual SQL operation id=integer, username=string, date=access date format, link=access link format
$sql="INSERT INTO test (id ,username, date, link_to_website) VALUES(1,'testuser', '2017-02-23', 'https://www.processmaker.com/')";
// execute operation
$stmt = $conn->prepare($sql);
$stmt->execute();
best regards
Sicilio