tiger2000
asked on
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('I mageType') .SetBlobDa ta(buffer, sizeof(buffer));
storedproc1.ExecProc;
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('I
storedproc1.ExecProc;
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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
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
ASKER
Please give me a detail sulotion.
can you send me a example?
I'm puzzled for a long time.
Thx in advance!