duckdb / duckdb-web

DuckDB website and documentation
https://duckdb.org
MIT License
168 stars 320 forks source link

Issue found on page 'ODBC Configuration' on Windows #3594

Open salvadorscardua opened 1 month ago

salvadorscardua commented 1 month ago

I read all documentation and i can't run a example ODBC on windows configuration using PHP.

After install drivers and configure the ODBC source POINTING for a file duckdb the PHP give me an error all time, i can connect but not read/write a file.

$conn = new PDO('odbc:DuckDB', $user, $password);
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);

echo "success to connect DuckDB!";

// select data
$query = "SELECT * FROM mytable"; 
$stmt = $conn->query($query);

image

szarnyasg commented 1 month ago

Hi @salvadorscardua what is the error message that you get?

salvadorscardua commented 1 month ago

Connected with success but the error is: SQLSTATE[42000]: Syntax error or access violation: 0 ODBC_DuckDB->PrepareStmt Catalog Error: Table with name mytable does not exist! Did you mean "pg_am"? LINE 1: SELECT * FROM mytable ^ (SQLPrepare[0] at ext\pdo_odbc\odbc_driver.c:204)