Thread: A problem with the nextval('') function

A problem with the nextval('') function

From
"Ray Daigle"
Date:
Hi,
 
I've been writing a VB application that uses 7.01.00.06 ODBC driver to access a PostgresSQL database.  Everything works OK until I try using the 'nextval' function.  When I try to execute SELECT nextval('userid') ,  either from my application or from the Visual Data Manager tool, I get an error that states: "The SELECT statment includes a reserved word or argumnet name that is misspelled or missing, or the punctuation is incorrect.  Number 3141".
 
The same query works fine on my database if I'm just using the standard UNIX PostgreSQL client, it's only when I try to execute it through ODBC that I get a problem.
 
Does anyone know if the 7.01.00.06 version of the psqlodbc drivers support the nextval function in a SELECT query?
 
Thanks,
 
Ray Daigle
Technical Analyst
Click2Net Inc.
Tel: (905) 271 3550 ext. 222
Fax: (905) 271 3650
rdaigle@click2net.com
 
 

RE: A problem with the nextval('') function

From
"Hiroshi Inoue"
Date:
-----Original Message-----
From: Ray Daigle

> Hi,

> I've been writing a VB application that uses 7.01.00.06 ODBC driver to
access a PostgresSQL database.  Everything works OK
> until I try using the 'nextval' function.  When I try to execute SELECT
nextval('userid') ,  either from my application or from
> the Visual Data Manager tool, I get an error that states: "The SELECT
statment includes a reserved word or argumnet name
> that is misspelled or missing, or the punctuation is incorrect.  Number
3141".

ODBC itself doesn't reject the query.
Aren't you using DAO-jet ?

regards,
Hiroshi Inoue



RE: A problem with the nextval('') function

From
"Henshall, Stuart - WCP"
Date:
Hello,
    Sounds like you need to use a pass through query (as they're called
in MS Access)
- Stuart

> -----Original Message-----
> From:    Ray Daigle [SMTP:rdaigle@click2net.com]
> Sent:    Monday, August 27, 2001 6:57 PM
> To:    pgsql-odbc@postgresql.org
> Subject:    A problem with the nextval('') function
>
> Hi,
>
> I've been writing a VB application that uses 7.01.00.06 ODBC driver to
> access a PostgresSQL database.  Everything works OK until I try using the
> 'nextval' function.  When I try to execute SELECT nextval('userid') ,
> either from my application or from the Visual Data Manager tool, I get an
> error that states: "The SELECT statment includes a reserved word or
> argumnet name that is misspelled or missing, or the punctuation is
> incorrect.  Number 3141".
>
> The same query works fine on my database if I'm just using the standard
> UNIX PostgreSQL client, it's only when I try to execute it through ODBC
> that I get a problem.
>
> Does anyone know if the 7.01.00.06 version of the psqlodbc drivers support
> the nextval function in a SELECT query?
>
> Thanks,
>
> Ray Daigle
> Technical Analyst
> Click2Net Inc.
> Tel: (905) 271 3550 ext. 222
> Fax: (905) 271 3650
> rdaigle@click2net.com
>
>