Board index » delphi » How to save memo.lines.text into a varchar 4000 field on MSSQL 7

How to save memo.lines.text into a varchar 4000 field on MSSQL 7

How to save memo.lines.text into a varchar 4000 field on MSSQL 7.

query.fieldbyname ('note').asstring := memo.lines.text;

only 255 chars get saved. I think this is a limit in BDE, but how to fix
it?

--
Jacob Pedersen
AK Techotel
J.Peder...@nospamtechotel.dk
(Remove nospam when replying!)

 

Re:How to save memo.lines.text into a varchar 4000 field on MSSQL 7


i use:

  query.close;
  query.sql.clear;
  query.sql.add('INSERT INTO TableBlah (NOTE)');
  query.sql.add('VALUES (:Note)');
  query.parambyname('note').asblob := memo.text;
  query.execsql;

and it work..

Quote
"Jacob Pedersen" <J.Peder...@techotel.dk> wrote in message

news:Xns90D45AD77E641jpedersentechotel@207.105.83.65...
Quote
> How to save memo.lines.text into a varchar 4000 field on MSSQL 7.

> query.fieldbyname ('note').asstring := memo.lines.text;

> only 255 chars get saved. I think this is a limit in BDE, but how to fix
> it?

> --
> Jacob Pedersen
> AK Techotel
> J.Peder...@nospamtechotel.dk
> (Remove nospam when replying!)

Re:How to save memo.lines.text into a varchar 4000 field on MSSQL 7


sorry..
i use it to insert into a blob field..

"Edward H. Sinaga" <esin...@pku.co.id> wrote in message
news:3b445f7e_1@dnews...

Quote
> i use:

>   query.close;
>   query.sql.clear;
>   query.sql.add('INSERT INTO TableBlah (NOTE)');
>   query.sql.add('VALUES (:Note)');
>   query.parambyname('note').asblob := memo.text;
>   query.execsql;

> and it work..

> "Jacob Pedersen" <J.Peder...@techotel.dk> wrote in message
> news:Xns90D45AD77E641jpedersentechotel@207.105.83.65...
> > How to save memo.lines.text into a varchar 4000 field on MSSQL 7.

> > query.fieldbyname ('note').asstring := memo.lines.text;

> > only 255 chars get saved. I think this is a limit in BDE, but how to fix
> > it?

> > --
> > Jacob Pedersen
> > AK Techotel
> > J.Peder...@nospamtechotel.dk
> > (Remove nospam when replying!)

Re:How to save memo.lines.text into a varchar 4000 field on MSSQL 7


"Edward H. Sinaga" <esin...@pku.co.id> wrote in <3b446008_2@dnews>:

Quote
>sorry..
>i use it to insert into a blob field..

Yeah, maybe I should change the fields to blob then?

--
Jacob Pedersen
AK Techotel
J.Peder...@nospamtechotel.dk
(Remove nospam when replying!)

Other Threads