From: Josh Tanski <mortonjt@rochester.rr.com>
To: Richard Broersma <richard.broersma@gmail.com>
Cc: pgsql-odbc@postgresql.org
Subject: Re: VBA ADO Command Date Parameter Not Working
Date: Mon, 23 Nov 2009 12:54:38 -0500
Message-ID: <4B0ACC5E.9010100@rochester.rr.com> (raw)
In-Reply-To: <396486430911230936h410908depf3934386aac9efb7@mail.gmail.com>
References: <4B0AAE9D.9030201@rochester.rr.com>
<396486430911230855n6f283472t90c04e02615c075f@mail.gmail.com>
<4B0AC54E.2050005@rochester.rr.com>
<396486430911230936h410908depf3934386aac9efb7@mail.gmail.com>
Richard Broersma wrote:
> On Mon, Nov 23, 2009 at 9:24 AM, Josh T <mortonjt@rochester.rr.com> 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
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: mortonjt@rochester.rr.com, richard.broersma@gmail.com
Subject: Re: VBA ADO Command Date Parameter Not Working
In-Reply-To: <4B0ACC5E.9010100@rochester.rr.com>
References: <4B0AAE9D.9030201@rochester.rr.com> <396486430911230855n6f283472t90c04e02615c075f@mail.gmail.com> <4B0AC54E.2050005@rochester.rr.com> <396486430911230936h410908depf3934386aac9efb7@mail.gmail.com> <4B0ACC5E.9010100@rochester.rr.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