post Image to sybase using storedproc&Delphi

Hi,
Sybase's storedproc seems haven't image type parameter.
Who can give me a suggestion or example that can post image to sybase using storedproc&delphi.
eg.
in delphi:
buffer is a point to a image
storedproc1.ParamByName('ImageType').SetBlobData(buffer, sizeof(buffer));
storedproc1.ExecProc;
tiger2000Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
david_levineConnect With a Mentor Commented:
An image datatype can't be used as a parameter in a stored proc.

What you can do is store the image in a table and pass the table's primary key to the procedure.

David
0
 
tiger2000Author Commented:
Hi, levine
Please give me a detail sulotion.
can you send me a example?

I'm puzzled for a long time.

Thx in advance!
0
 
david_levineCommented:
What you could do is create another table that's only purpose is to hold your image object temporarily.

From your application, you would load this image into the table along with setting some identifier in another column in this "temporary" table.

Then you would call your stored procedure and pass as one of the parameters to the stored procedure, the identifier for your image record. The stored proc would then retrieve the image from the "temporary" table, use it in your stored proc and if all was successful, you would then delete it from the "temporary" table.

This gets around the issue of actually passing the image object to a stored procedure. You just pass the identifier for the image object you loaded in your other table.

David
0
All Courses

From novice to tech pro — start learning today.