Re: VBA ADO Command Date Parameter Not Working - Mailing list pgsql-odbc

From Josh Tanski
Subject Re: VBA ADO Command Date Parameter Not Working
Date
Msg-id 4B0ACC5E.9010100@rochester.rr.com
Whole thread Raw
In response to Re: VBA ADO Command Date Parameter Not Working  (Richard Broersma <richard.broersma@gmail.com>)
List pgsql-odbc
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


pgsql-odbc by date:

Previous
From: Richard Broersma
Date:
Subject: Re: VBA ADO Command Date Parameter Not Working
Next
From: Nick Snellock
Date:
Subject: Windows 7 support