Re: Incorrect number of parameters, expected 2.
- From: "Dave Williss" <dwillissNS@xxxxxxxxxxxxxxx>
- Date: Mon, 3 Oct 2005 11:49:42 -0500
I will try Dmitriy's suggestion when I get a chance, but I don't think it
will work.
As I understand, you can also "quote" any identifier in square brackets and
ODBC will replace them with whatever the underlying driver wants. I do this
routinely with field names, I tried that and it didn't work either.
Since Matt was able to get it to work with the table name in double quotes
by modifying the actual query to have numeric constants instead of string
constants, I believe him when he says it's a bug in the ODBC driver.
"Dmitriy Ivanov" <divanov_NOSP@xxxxxxxx> wrote in message
news:dhijjn$317g$1@xxxxxxxxxxxxxx
> Hello Dave,
>
> "Matt Neerincx [MSFT]" <mattn@xxxxxxxxxxxxxxxxxxxx> wrote:
>
> MNM> Appears to be a bug in the Access ODBC driver and how it handles
> MNM> string constants embedded in the SQL. I think it is interpreting
> MNM> the string constant "Customers" as a unresolved column name.
> MNM>| ...snip...|
>
> Appears to be a MSFT bug in choosing a knowledgeable person responsible
> for
> support and consulting in ODBC.
>
> DW> If I use ODBC to connect to the Northwind sample database, and
> DW> execute the statement
> DW>
> DW> SELECT COUNT(*) from "Customers and Suppliers by City";
> DW>
> DW> I get the error
> DW>
> DW> Incorrect number of parameters, expected 2.
>
> You should use single quotes instead of double with the Access driver,
> i.e.
>
> SELECT COUNT(*) from `Customers and Suppliers by City`;
>
> See
> SQLGetInfo(hdbc, SQL_IDENTIFIER_QUOTE_CHAR, ...);
>
> Generally, SQL syntax for ODBC slightly differs from the one acceptable by
> Access. (Actually the former is closer to the SQL standard.)
> --
> Sincerely,
> Dmitriy Ivanov
> Common Lisp ODBC interface - www.ystok.ru
>
>
>
.
- Prev by Date: Re: Editing IP address in Excel ODBC link
- Next by Date: I can't connect to a Navision Server from other machine
- Previous by thread: RE: Connection error SQLSetConnectAttr failed
- Next by thread: I can't connect to a Navision Server from other machine
- Index(es):
Relevant Pages
|