Found it.  It was a coding error on my part.  All non-date fields have
the "NOT NULL" requirement on them while date fields can be nullable
and I needed a loop to set any fields I wasn't explicitly setting to
an empty string.

Unfortunately, I was conditionally setting based on the field name.
Not all the datetime fields had the word "date" in them and I had a
loop that automatically set non-date fields to empty str, (i.e. :"last
consultation" = '').

This was some of my earliest Sequel code, so I didn't quite know how
to check the data type on the fields as I do now.  Improved code is
driven by data type now.  The "model" where I made this change mid
March was in a folder shared by all the projects, so I introduce the
bug to the project that hasn't changed since last year.

Thanks for listening and for the tip on producing the debug info.
That was the key to unlocking this one.

Michael

On Tue, May 25, 2010 at 1:50 PM, Jeremy Evans <[email protected]> wrote:
> On May 25, 10:42 am, Michael Lang <[email protected]> wrote:
>> Sorry, I hit the send button too fast.
>>
>> unixODBC, FreeTDS, => odbc driver with mssql db_type connecting to MSDE 2000.
>>
>> I haven't updated versions for unixODBC nor FreeTDS since building the
>> server last Fall.
>
> Add some debug printing to Database#convert_odbc_value in the ODBC
> adapter to see if ODBC is providing weird types.  I can see this
> happening only if ODBC is providing ODBC::TimeStamp, ODBC::Date, or
> ODBC::Time values for NULL values.
>
> Jeremy
>
> --
> You received this message because you are subscribed to the Google Groups 
> "sequel-talk" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/sequel-talk?hl=en.
>
>



-- 
http://codeconnoisseur.org

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sequel-talk?hl=en.

Reply via email to