From: Jeff Eckermann <jeff_eckermann@yahoo.com>
To: Nigel Brookes <nigel.brookes@clerys.ie>
To: pgsql-odbc@postgresql.org
Subject: Re: Insert query
Date: Fri, 17 Oct 2003 06:59:33 -0700 (PDT)
Message-ID: <20031017135933.47682.qmail@web20803.mail.yahoo.com> (raw)
In-Reply-To: <GJEDKCECINGIEHOMGOKIEEAGCAAA.nigel.brookes@clerys.ie>
--- 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-odbc@postgresql.org
Cc: jeff_eckermann@yahoo.com, nigel.brookes@clerys.ie
Subject: Re: Insert query
In-Reply-To: <20031017135933.47682.qmail@web20803.mail.yahoo.com>
References: <GJEDKCECINGIEHOMGOKIEEAGCAAA.nigel.brookes@clerys.ie> <20031017135933.47682.qmail@web20803.mail.yahoo.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox