There is a table:
CREATE TABLE HOOKNAMES ( HN_ID SMALLINT NOT NULL PRIMARY KEY, HN_NAME VARCHAR(20) NOT NULL, HN_LEVEL SMALLINT NOT NULL, HN_IMAGE BLOB); The first 3 fields are filled with this:
Form1.IBSql1.SQL.Clear; Form1.IBSql1.SQL.Append('INSERT INTO HOOKNAMES (HN_ID, HN_NAME, HN_LEVEL) '); Form1.IBSql1.SQL.Append('VALUES ('+TempBuf[3]+', '+TempBuf[0]+', '+TempBuf[1]+')'); Form1.IBSql1.ExecQuery; I try to add the last field as follows (I found an example on this site):
Form1.HookNamesDS.Edit; TBlobField(Form1.HookNamesDS.FieldByName('HN_IMAGE')).LoadFromFile('..\bilder\image.png'); Form1.HookNamesDS.Post; Var HookNamesDS: TIBDataSet;
I get an error when I try to change the DataSet, which is read-only, the DataSource is not specified in it, the entire table is simply selected via SelectSQL.
How in this example is the binding exactly to the desired line?
How to properly initialize the DataSet? And how to work with him?