Re: Insert query - Mailing list pgsql-odbc

From Jeff Eckermann
Subject Re: Insert query
Date
Msg-id 20031017135933.47682.qmail@web20803.mail.yahoo.com
Whole thread Raw
In response to Insert query  ("Nigel Brookes" <nigel.brookes@clerys.ie>)
List pgsql-odbc
--- Nigel Brookes <nigel.brookes@clerys.ie> wrote:
> Hi Folks,
>
> I'm very new to ODBC and am using VB 5.0.  I have a
> table with a serial data
> type that I'm trying to insert a record into using.
>
> INSERT INTO users VALUES (DEFAULT,'Nigel');
>
> This works when i'm in linux. But when I try to
> execute it in VB I get an
> error 'Too few parameters. Expected 1.'.  Very
> strange.  Have tried all 3
> odbc drivers.  The VB code I use is as follows:
>
>         Dim Backupdb As Database
>         '******opens access to PostgreSQL database
> ***********************
>         Connect =
>
"ODBC;DSN=backupdb;DATABASE=backupdb;UID=test;PWD=test;"
>         Set Backupdb = OpenDatabase("backupdb",
> False, False, Connect)
>
>
'*****************************************************************
>
>         Backupdb.Execute txtExecute.Text
>
> Any Ideas??

Don't know the cause of the error, but: what happens
if you use "INSERT INTO users (fieldname) VALUES
('Nigel');" ?

__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

pgsql-odbc by date:

Previous
From: "Nigel Brookes"
Date:
Subject: Insert query
Next
From: "Greg Campbell"
Date:
Subject: Re: Insert query