Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

creating Blob field in _Recordset.....(Urgent help needed)

Status
Not open for further replies.

oguraja

Programmer
Jun 14, 2003
124
US
I have created a recordset as shown below. This contains three fields ( 2 string fields and one BLOB field)

I have created the recordset using the following code

var
FRecordset : _recordset;

FRecordset := CoRecordset.Create;
FRecordset.CursorLocation := adUseClient;

FRecordset.Fields.Append
('Field1',adBstr,100,adFldUnspecified);
FRecordset.Fields.Append
('Field2',adBstr,100,adFldUnspecified);
FRecordset.Fields.Append
('Field3',adBinary,100,adFldUnspecified);

I want to add a picture(using BLOB) from the local hard drive into the recordset.I use the following code for that.

But i dont know how to CREATE A BLOB FIELD to load a picture from a file.

FRecordset.Open(EmptyParam,EmptyParam,
adOpenUnspecified,adLockUnspecified,1);
FRecordset.AddNew(
VarArrayOf([
WideString('Field1'),
WideString('Field2'),
WideString('Field3')
]),
VarArrayOf([
sTest,sTest,BlobField]));---> This
part doesnt work cos i
dont know how to create a a blob field with a picture
information
FRecordset.Update(Emptyparam,EmptyParam);

Please kindly help me thnx in advance..... This is really urgent

Raja
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top