[fpc-pascal] Documentation for sqldb - More Questions
Joost van der Sluis
joost at cnoc.nl
Tue Jul 3 13:12:31 CEST 2007
On Tue, 2007-07-03 at 20:30 +1000, John wrote:
> > > 1) When I tried editing in a dbGrid, I had trouble with the field
> > > length. Looking through the code, I can't see anywhere where the length
> > > of a string is checked against the length of the field, and longer
> > > strings appear to overflow the field / record buffer. Should this be so
> > > ? I can fix the problem by doing the edits with a dbEdit control with a
> > > specified maximum length, but I can't find anything in the dbGrid
> > > component to do this. (I presume it would really be the TColumn
> > > component)
> > >
> >
> > This is more a Lazarus-issue.
> >
> >
> > > My real question is, should it be the data control be doing it, or
> > > should the sql components truncate a string that is too long ?
> > >
> >
> > The data-controls. Or you can leave it to the SQL-Server. The official
> > SQL-specs say that the string should be truncated without any error. But
> > not all SQL-servers obey that rule...
> >
> The problem is that if the strings are too long, they overflow the
> buffer - I think the record buffer in T(Buf)Dataset - and break things
> before the data gets as far as the database itself.
Can you make a bug-report for this?
--
Met vriendelijke groeten,
Joost van der Sluis
CNOC Informatiesystemen en Netwerken
http://www.cnoc.nl
More information about the fpc-pascal
mailing list