🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.database.ado
1 messages
1 total messages Started by Max B Shahab Fri, 17 Nov 2000 18:47
How to insert IMAGE into MS SQL 7 via TAdoStoredProc?
#6008
Author: Max B Shahab
Date: Fri, 17 Nov 2000 18:47
24 lines
1561 bytes
I work with MS SQL 7 and C ++ Builder 5.

How can I insert IMAGE into MS SQL 7 via TAdoStoredProc? This is a SQL
stored proc below:

CREATE PROCEDURE sp_AddPhoto (@idphoto INTEGER, @photo IMAGE)
AS
BEGIN
  SET NOCOUNT ON
  DECLARE @ptrval binary(16)
  EXEC sp_dboption 'photo', 'select into/bulkcopy', 'true'
  SELECT @ptrval = TEXTPTR(photo) FROM photo WHERE idphoto = @idphoto
  WRITETEXT photo.photo @ptrval @photo
  EXEC sp_dboption 'photo', 'select into/bulkcopy', 'false'
  SET NOCOUNT OFF
END

What (and how ;-) must I write in Builder?

myDataModule->spAddPhoto->Parameters->ParamByName("@photo")->Value = ???

It will be fun if You'll show me a codesample.

Much thanks.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads