 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
A Barale Guest
|
Posted: Wed Aug 13, 2003 2:20 pm Post subject: Re: Inserting / Reading Blob fields (Sybase) |
|
|
Thanks
I'll try using a TQuery rather.
As for (2) There is no error message, the code executes correctly but there is no data in the column after the insert.
Anton Barale
"Robert Cerny" <robert.qwe.cerny (AT) neosys (DOT) xrs.qwe.si> wrote:
| Quote: | Yes.
1. NEVER use TTable with sql servers
2. READ the error messages, "does not work" is not an error description
--
Robert Cerny
http://codecentral.borland.com/codecentral/ccWeb.exe/author?authorid=18355
"A Barale" <AntonBarale (AT) Hotmail (DOT) com> wrote in message
news:3f3a0d5a$1 (AT) newsgroups (DOT) borland.com...
Hello
I’m trying to insert a bolb field (Word doc) into a Sybase 11.03 database.
I’m using Delphi 6. I’ve tried the following but cannot get it to work.
Does anyone know a better method?
try
PTable.DatabaseName := IMPORT_DB;
PTable.TableName := DB+TABLE;
PTable.AutoRefresh := True;
PTable.Active := False;
PTable.Active := True;
try
PTable.Open;
PTable.Insert;
TBlobField(PTable.FieldByName('blob')).LoadFromFile(‘filename’);
PTable.FieldByName('organisation_id').AsInteger := 1;
PTable.FieldByName('blob_name').AsString := ‘Name’;
PTable.Post;
finally
PTable.Close;
end;
except
On E: Exception do
begin
MessageDlg(E.Message, mtError, [mbOk], 0);
Result := False;
end;
end;
Thanks
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|