Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 9172B632750 for ; Mon, 23 Nov 2009 13:54:50 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 90803-03 for ; Mon, 23 Nov 2009 17:54:38 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from hrndva-omtalb.mail.rr.com (hrndva-omtalb.mail.rr.com [71.74.56.124]) by mail.postgresql.org (Postfix) with ESMTP id D62A8632396 for ; Mon, 23 Nov 2009 13:54:39 -0400 (AST) Received: from [167.120.214.235] (really [24.97.199.161]) by hrndva-omta01.mail.rr.com with ESMTP id <20091123175438796.LSWK4786@hrndva-omta01.mail.rr.com>; Mon, 23 Nov 2009 17:54:38 +0000 Message-ID: <4B0ACC5E.9010100@rochester.rr.com> Date: Mon, 23 Nov 2009 12:54:38 -0500 From: Josh Tanski User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: Richard Broersma CC: pgsql-odbc@postgresql.org Subject: Re: VBA ADO Command Date Parameter Not Working References: <4B0AAE9D.9030201@rochester.rr.com> <396486430911230855n6f283472t90c04e02615c075f@mail.gmail.com> <4B0AC54E.2050005@rochester.rr.com> <396486430911230936h410908depf3934386aac9efb7@mail.gmail.com> In-Reply-To: <396486430911230936h410908depf3934386aac9efb7@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.599 tagged_above=-10 required=5 tests=BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 200911/64 X-Sequence-Number: 10113 Richard Broersma wrote: > On Mon, Nov 23, 2009 at 9:24 AM, Josh T wrote: > >> cmd.Parameters.Append cmd.CreateParameter("@test_date", adDBDate, >> adParamInput, 4, "2009-11-23") > > Does anything change is you set the byte size from 4 to something like 10 or 12? Does not make a difference, nor does leaving empty. > >> cmd.CommandText = "INSERT INTO test_table (test_date) VALUES (?);" > > Another thought would be to rewrite the insert expression to: > > INSERT INTO Test_table( test_date ) > VALUES( CAST( ? AS DATE )); > > Although it probably wont help much. > > No luck either - I get 1900-05-07 if I use adDBDate, an error if I use adVarChar. Thanks again, Josh