da.eXecutoR
New member
- Local time
- Today, 05:26
- Joined
- May 5, 2011
- Messages
- 3
Hey Access community!
I'm a php developer from switzerland and I'm currently running into a strange problem with an old access database.
The creator of the access database has choosen some column names which brings me now in troubles.
I've got names like "Verkauf-Durch", "Auftrags-Nr.", "Name der Firma" and so on.
Now when I'm trying this query in which way ever:
I'm always gettin some error messages. Mostly the look like:
or...
...or even...
So please folks, can somebody help me outa here?
If I'm querying a column with a "normal" name like "Versandart" it works like a charm!
Greetings
eXe
I'm a php developer from switzerland and I'm currently running into a strange problem with an old access database.
The creator of the access database has choosen some column names which brings me now in troubles.
I've got names like "Verkauf-Durch", "Auftrags-Nr.", "Name der Firma" and so on.
Now when I'm trying this query in which way ever:
PHP:
$sql = $db->con->query("SELECT Verkauf-Durch FROM T_Auftrag");
$sql = $db->con->query("SELECT \"Verkauf-Durch\" FROM T_Auftrag");
$sql = $db->con->query("SELECT [Verkauf-Durch] FROM T_Auftrag");
$sql = $db->con->query("SELECT `Verkauf-Durch` FROM T_Auftrag");
PHP:
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[07002]: COUNT field incorrect: -3010 [Microsoft][ODBC Microsoft Access Driver] 1 Parameter wurden erwartet, aber es wurden zu wenig Parameter übergeben. (SQLExecute[-3010] at ext\pdo_odbc\odbc_stmt.c:254)' in C:\Websites\Systemmanagement\Website\comitis\system\services\nortonantivirus.php:34 Stack trace: #0 C:\Websites\Systemmanagement\Website\comitis\system\services\nortonantivirus.php(34): PDO->query('SELECT "Verkauf...') #1 {main} thrown in C:\Websites\Systemmanagement\Website\comitis\system\services\nortonantivirus.php on line 34
or...
PHP:
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[07002]: COUNT field incorrect: -3010 [Microsoft][ODBC Microsoft Access Driver] 2 Parameter wurden erwartet, aber es wurden zu wenig Parameter übergeben. (SQLExecute[-3010] at ext\pdo_odbc\odbc_stmt.c:254)' in C:\Websites\Systemmanagement\Website\comitis\system\services\nortonantivirus.php:34 Stack trace: #0 C:\Websites\Systemmanagement\Website\comitis\system\services\nortonantivirus.php(34): PDO->query('SELECT Verkauf-...') #1 {main} thrown in C:\Websites\Systemmanagement\Website\comitis\system\services\nortonantivirus.php on line 34
...or even...
PHP:
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: -1002 [Microsoft][ODBC Microsoft Access Driver] Unzulässiges Einklammern des Namens '[T_Auftrag.Verkauf-Durch]'. (SQLExecute[-1002] at ext\pdo_odbc\odbc_stmt.c:254)' in C:\Websites\Systemmanagement\Website\comitis\system\services\nortonantivirus.php:34 Stack trace: #0 C:\Websites\Systemmanagement\Website\comitis\system\services\nortonantivirus.php(34): PDO->query('SELECT [T_Auftr...') #1 {main} thrown in C:\Websites\Systemmanagement\Website\comitis\system\services\nortonantivirus.php on line 34
So please folks, can somebody help me outa here?
If I'm querying a column with a "normal" name like "Versandart" it works like a charm!
PHP:
$sql = $db->con->query("SELECT Versandart FROM T_Auftrag");
eXe