Re: VBA ADO Command Date Parameter Not Working

From: Josh Tanski <mortonjt(at)rochester(dot)rr(dot)com>
To: Richard Broersma <richard(dot)broersma(at)gmail(dot)com>
Cc: pgsql-odbc(at)postgresql(dot)org
Subject: Re: VBA ADO Command Date Parameter Not Working
Date: 2009-11-23 17:54:38
Message-ID: 4B0ACC5E.9010100@rochester.rr.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

Richard Broersma wrote:
> On Mon, Nov 23, 2009 at 9:24 AM, Josh T <mortonjt(at)rochester(dot)rr(dot)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

In response to

Browse pgsql-odbc by date

  From Date Subject
Next Message Nick Snellock 2009-11-23 19:55:59 Windows 7 support
Previous Message Richard Broersma 2009-11-23 17:36:26 Re: VBA ADO Command Date Parameter Not Working