Skip to content
Advertisement

odbc_exec(): SQL error: [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1., SQL state 07001 in SQLExecDirect

I have some problem in PHP using MS Access database, when I running the query in PHP show error

odbc_exec(): SQL error: [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1., SQL state 07001 in SQLExecDirect

But when I’m going echo the “$query” variable and running the syntax in Microsoft Access is running well.

And this is my query:

JavaScript

And this is my table field CalculateData : CalculateData


And this is my table field TransactionLog : TransactionLog

Advertisement

Answer

First, your sql command must evaluate to something like this:

JavaScript

Thus, try:

JavaScript

You could also try this simpler approach:

JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement