Board index » delphi » Inserting Data into a Memo / Blob Field Using Paradox

Inserting Data into a Memo / Blob Field Using Paradox

Hello Dear Reader

I want to use a TQuery.ExecSql to insert Data into a Table. One of the
fields ('NOTESFIELD') is Defined as a Memo in a Paradox Table.

I use code like this...

eg QueryUpdate.Sql.Add(
                'INSERT INTO TABLE (PRIMARYKEYFIELD, NOTESFIELD)
                VALUES(1,'Notes about stuff')
                );
 QueryUpdate.ExecSql;

This will give a 'mismatched field error' because you can't insert a string
into a TMemo / Blob field.

How do you insert data in this manner WITHOUT using visual component;

Stephen

 

Re:Inserting Data into a Memo / Blob Field Using Paradox


Quote
Stephen Novotny wrote:

> Hello Dear Reader

> I want to use a TQuery.ExecSql to insert Data into a Table. One of the
> fields ('NOTESFIELD') is Defined as a Memo in a Paradox Table.

> I use code like this...

> eg QueryUpdate.Sql.Add(
>                 'INSERT INTO TABLE (PRIMARYKEYFIELD, NOTESFIELD)
>                 VALUES(1,'Notes about stuff')
>                 );
>  QueryUpdate.ExecSql;

> This will give a 'mismatched field error' because you can't insert a string
> into a TMemo / Blob field.

> How do you insert data in this manner WITHOUT using visual component;

> Stephen

I have the same problem on storing any data in a BLOB-Field (Interbase).
I DON'T USE VISUAL COMPONENTS. I read the data with pchar and
tMemoryStream from the query.
How i can store data in a BLOB?

Thomas

Re:Inserting Data into a Memo / Blob Field Using Paradox


In article <01bc06ac$5b50e120$2c711...@intercoast.com.au.203.22.112.2>,
Stephen Novotny <dis-peo...@intercoast.com.au> writes

Quote
>Hello Dear Reader

>I want to use a TQuery.ExecSql to insert Data into a Table. One of the
>fields ('NOTESFIELD') is Defined as a Memo in a Paradox Table.

>I use code like this...

>eg QueryUpdate.Sql.Add(
>               'INSERT INTO TABLE (PRIMARYKEYFIELD, NOTESFIELD)
>               VALUES(1,'Notes about stuff')
>               );
> QueryUpdate.ExecSql;

>This will give a 'mismatched field error' because you can't insert a string
>into a TMemo / Blob field.

>How do you insert data in this manner WITHOUT using visual component;

>Stephen

and, in a very similar vein, is there a way to add data into an
Interbase Blob field with a SQL script?  The manual implies that there
is, but I cannot get it to work.

--
Pete Clark
ElmSoft Ltd
Tel (01253) 22637 - (0973) 333595

Other Threads