Re: MYSQL - ADO Insert problem - Help please

From: Mike Shkolnik (mshkolnik2002_at_ukr.net)
Date: 01/25/05


Date: Tue, 25 Jan 2005 11:02:57 +0200

Have you the persistent field in delphi? if yes, just set the size of field
in 50 there - seems that your ODBC driver detect the field size
(automatically) incorrectly

--
With best regards, Mike Shkolnik
EMail: mshkolnik@scalabium.com
http://www.scalabium.com
"Alfonso Sanz" <do.not.reply@alcatel.de> wrote in message
news:1106639841.327279@slbhw0...
> Hello,
>
> I have the following table:
> field_1 varchar(50)
> idx int(11) *PRIMARY KEY
>
> I use an ODBC-Connection with DELPHI to insert new Items in the table.
> I have the following effect:
> Assume I have in the table the following content in field_1:
> "Text12345" (9 characters)
> "Text123"
> "Text12"
>
> Now I do via ADO an insert statement:
> ADO.Insert;
> ADO['field_1']:='Alfonso Sanz Alonso 1234567890';
> ADO.Post;
>
> If I look now at the content of the table, I find a new Record with this
> entry for field_1:
> "Alfonso S" (9 characters)
>
> It has been truncated to the length of the biggest entry in the table.
> If the biggest entry is 20 characters long, it will be truncated to 20.
>
> Does anyone know the problem? Do I forgot something?
>
> I'm using ODBC for MySQL Ver. 2.50.39 with Windows XP.
>
> bye
> Alfonso


Relevant Pages

  • MYSQL - ADO Insert problem - Help please
    ... I use an ODBC-Connection with DELPHI to insert new Items in the table. ... "Text12345" (9 characters) ... If the biggest entry is 20 characters long, it will be truncated to 20. ...
    (borland.public.delphi.database.ado)
  • Re: [PHP] Smart Quotes not so smart
    ... Client has a large MS SQL database with lots of data. ... includes "smart quotes", aka curly quotes, but not real ones. ... On our new devel setup (SQL Server 2k, OpenTDS ODBC driver, Apache, PHP ... marks or accented characters that signify a garbled smart quote. ...
    (php.general)
  • Smart Quotes not so smart
    ... Client has a large MS SQL database with lots of data. ... includes "smart quotes", aka curly quotes, but not real ones. ... On our new devel setup (SQL Server 2k, OpenTDS ODBC driver, Apache, PHP ... marks or accented characters that signify a garbled smart quote. ...
    (php.general)
  • Re: I suppose the idea of classes and inheritance is
    ... Look Jamie, Rob and I are not making a personal attack, we are simply ... If your code relies on accessing characters of a string that aren't in the range of that string, then yes, your code is wrong. ... With WideString values, Delphi misinterprets the length field as a character count when it's really a byte count, so accessing characters in the range ) is allowed, even though the only safe range is. ...
    (alt.comp.lang.borland-delphi)
  • Re: Delphi Quiz: SetLength( WideString, 10 );
    ... > What about string conversions? ... Delphi doesn't do UCS-4. ... UCS-4 characters anyway since Windows uses UCS-2, ... Just like UTF-8 encodes characters ...
    (alt.comp.lang.borland-delphi)