[Haskell-cafe] Re: HDBC-ODBC, bindCol

John Goerzen jgoerzen at complete.org
Wed Jan 28 22:34:25 EST 2009


Hi,

I guess the question is: what type of data does Access need in that
situation?

So, as an example: say you have an 8-bit Integer column in Access, and
someone passes an SqlInt64 to the system.  What do you do?  Can you
pass an Int64 to Access and have it convert?

In general, the ODBC spec -- if memory serves -- implies that the
database engines aren't smart enough to do so.  Some database engines,
like PostgreSQL, are extremely versatile here and we can just convert
just about everything to a string and it will do the right thing.

-- John

On Thu, Jan 29, 2009 at 03:10:10AM +0100, G?uenther Schmidt wrote:
> Hi John,
>
> I've just been going  through the HDBC-ODBC code wondering if I could  
> find the spot that needs changing so that Doubles work properly with  
> MS-Access.
>
> Could you please tell me, if I understand this correctly?
>
> The bindCol function does not actually look at the particular value  
> type, ie. SqlDouble, SqlInteger ..., to determine the type but queries  
> the database via sqlDescribeParam to get the type.
>
> Which might fail though and not leave a clue. In that case the SqlType  
> still isn't used, but rather some default?
>
> If I was more literate in Haskell I would propably be able to answer  
> this myself, sry, I'll catch up.
>
> And I had a hell of a time finding an SQL/ODBC for C Tutorial and never  
> coded in C.
>
> Thanks upfront
>
> Günther
>
>



More information about the Haskell-Cafe mailing list