🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.databases.ms-access
2 messages
2 total messages Started by Yossi Konijn Mon, 07 Oct 1996 00:00
Access/ODBC problem
#101
Author: Yossi Konijn
Date: Mon, 07 Oct 1996 00:00
24 lines
1396 bytes
Hi,

I've been creating a PERL program that inputs and outputs information
from an Access 7.0 database via ODBC. All my SQL queries worked
perfectly up until the moment I tried using WHERE in the statement.
This gives my an error message about missing parameters. However, the
same query from within Acess works perfectly. Any idea?

The query is -

SELECT * FROM TSCustomers WHERE PhoneNumber1 = "4104842172";

and the error message is:

SQL failed "SELECT * FROM TSCustomers WHERE PhoneNumber1
="4104842172";": [Microsoft][ODBC Microsoft Access 7.0 Driver] Too few
parameters. Expected 1.


Please reply via e-mail since my news server is pretty shaky. Thanks.

Yossi Konijn
yossik@accentsoft.com
Re: Access/ODBC problem
#102
Author: Dave Roth
Date: Tue, 08 Oct 1996 00:00
24 lines
1612 bytes
In article <53adhb$5cu@news.NetVision.net.il>
yossik@accentsoft.com (Yossi Konijn) wrote:

> Hi,
> 
> I've been creating a PERL program that inputs and outputs 
information
> from an Access 7.0 database via ODBC. All my SQL queries worked
> perfectly up until the moment I tried using WHERE in the statement.
> This gives my an error message about missing parameters. However, 
the
> same query from within Acess works perfectly. Any idea?
> 
> The query is -
> 
> SELECT * FROM TSCustomers WHERE PhoneNumber1 = "4104842172";
                                                 ^^^^^^^^^^^^
You need to replace the double quotes with single quotes. Your query 
should look like:
  SELECT * FROM TSCustomers WHERE PhoneNumber1 = '4104842172'
If the value is a number (as opposed to a string) you may not even 
need the quotes; I can't remember.
dave
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads