Bob Beauchemin
5/9/2002 7:15:00 PM
Hi Jack,
I don't think its an SQL (language) thing....its a data type mapping thing.
I looked in the mappings of ODBC types to database types.OdbcType::Char and
VarChar map to SQL (database) CHAR and VARCHAR, which, in some databases,
has a limit of 255. OdbcType::Text maps to LONGVARCHAR which AFAIK, is an
Access memo field.
Cheers,
Bob Beauchemin
bobb@develop.com
"Jack Straub" <j.w.straub@att.net> wrote in message
news:1d7e01c1f773$37c4f940$9be62ecf@tkmsftngxa03...
> Thank you, that did. But why? Or is the answer that it's
> past time I bought a book on SQL?
>
>
> >-----Original Message-----
> >Have you tried OdbcType::Text?
> >
> >Bob Beauchemin
> >bobb@develop.com
> >
> >
> >"Jack Straub" <j.w.straub@att.net> wrote in message
> >news:16c001c1f6d6$954b2a50$9ee62ecf@tkmsftngxa05...
> >> Hi -
> >>
> >> I am trying to update a memo field using the ODBC .net
> >> libraries in Visual C++. My OdbcParameter type is
> >> OdbcType::Char (I have also tried VarChar), and the
> size
> >> and precision default. Everything is fine as long as I
> >> keep my parameter value between 0 and 255 characters;
> as
> >> soon as I exceed 255 characters,
> >> OdbcCommand::ExecuteNonQuery throws an exception,
> >> insisting that I am using an invalid precision value
> >> (ERROR [HY104] [Microsoft][ODBC Microsoft Access
> Driver]
> >> Invalid precision value). I have tried playing with
> >> OdbcParameter::Precision, but I don't even know what
> this
> >> property means in the context of a string.
> >>
> >> Can you tell me what I am doing wrong?
> >>
> >> Thanks.
> >
> >
> >.
> >