BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Re: Inserting / Reading Blob fields (Sybase)

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (SQL Servers)
View previous topic :: View next topic  
Author Message
A Barale
Guest





PostPosted: Wed Aug 13, 2003 2:20 pm    Post subject: Re: Inserting / Reading Blob fields (Sybase) Reply with quote




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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (SQL Servers) All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.