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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

insert object into sql sever 2000

Status
Not open for further replies.

anurakin

Programmer
Oct 16, 2007
1
procedure TFCustomer.Do_Insert_Img(pCust_ID:String);
const
sqlIns_Img = 'INSERT INTO tbCust_Img(Cust_ID,Cust_Img) ' +
'VALUES:)Cust_ID,:Cust_Img)';
var
mStream : TMemoryStream;
begin

mStream := TMemoryStream.Create;
try
mStream.Clear;
mStream.LoadFromFile(OpenDialog1.FileName);
mStream.Position := 0;

with ClientDataSet1 do begin
Close;
CommandText := sqlIns_Img;
Params.ParamByName('Cust_ID').AsString := pCust_ID;
Params.ParamByName('Cust_Img').LoadFromStream(mStream,ftBlob);
Execute;
end;
finally
mStream.Free;
end;
end;

It's Error 'Operand type clash: text is incompatible with image'
Please Help Me
Thank You.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top