Re: Insert query

From: Jeff Eckermann <jeff_eckermann(at)yahoo(dot)com>
To: Nigel Brookes <nigel(dot)brookes(at)clerys(dot)ie>, pgsql-odbc(at)postgresql(dot)org
Subject: Re: Insert query
Date: 2003-10-17 13:59:33
Message-ID: 20031017135933.47682.qmail@web20803.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

--- Nigel Brookes <nigel(dot)brookes(at)clerys(dot)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

In response to

Browse pgsql-odbc by date

  From Date Subject
Next Message Michelle Murrain 2003-10-20 19:20:34 Intermittent ODBC problems and spurious usernames and tables
Previous Message Greg Campbell 2003-10-17 13:58:46 Re: Insert query