X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 31114D1B508 for ; Fri, 17 Oct 2003 14:00:07 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 45515-09 for ; Fri, 17 Oct 2003 10:59:39 -0300 (ADT) Received: from web20803.mail.yahoo.com (web20803.mail.yahoo.com [216.136.226.192]) by svr1.postgresql.org (Postfix) with SMTP id 4091CD1B4F2 for ; Fri, 17 Oct 2003 10:59:30 -0300 (ADT) Message-ID: <20031017135933.47682.qmail@web20803.mail.yahoo.com> Received: from [208.13.35.65] by web20803.mail.yahoo.com via HTTP; Fri, 17 Oct 2003 06:59:33 PDT Date: Fri, 17 Oct 2003 06:59:33 -0700 (PDT) From: Jeff Eckermann Subject: Re: Insert query To: Nigel Brookes , pgsql-odbc@postgresql.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/56 X-Sequence-Number: 3369 --- Nigel Brookes 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