Access stored procedures with parameters - Newbee question
Posted: Thu 25 Aug 2005 12:47
Hi!
I'm new to this forum and the components. I've used the all components but the storedproc component.
The question is quite simpel I've a stored procedure I'd like to pase parameters to and execute. The stored procedure:
------------------------------------------------------------------------------------
-- =============================================
-- Create procedure
-- =============================================
-- creating the store procedure
CREATE PROCEDURE SettInnSamtale
@KUNDENR varchar(10),
@DATO varchar(8),
@TID varchar(8),
@ANR varchar(20),
@BNR varchar(30),
@BRUKER varchar(10),
@DESTINASJON varchar(40),
@VARIGHET varchar(8),
@FAKTURERT varchar(1),
@INNPRIS float,
@UTPRIS float,
@DB float,
@Songfaktura varchar(20)
AS
BEGIN
INSERT INTO Samtaler(KUNDENR,DATO,TID,ANR,BNR,BRUKER,DESTINASJON,VARIGHET,FAKTURERT,INNPRIS,UTPRIS,DB,Songfaktura)
VALUES (@KUNDENR,@DATO,@TID,@ANR,@BNR,@BRUKER,@DESTINASJON,@VARIGHET,@FAKTURERT,@INNPRIS,@UTPRIS,@DB,@Songfaktura)
END
GO
-------------------------------------------------------------------------------
How do I access this from Delphi with the components?
Thanks in advance
Terje
I'm new to this forum and the components. I've used the all components but the storedproc component.
The question is quite simpel I've a stored procedure I'd like to pase parameters to and execute. The stored procedure:
------------------------------------------------------------------------------------
-- =============================================
-- Create procedure
-- =============================================
-- creating the store procedure
CREATE PROCEDURE SettInnSamtale
@KUNDENR varchar(10),
@DATO varchar(8),
@TID varchar(8),
@ANR varchar(20),
@BNR varchar(30),
@BRUKER varchar(10),
@DESTINASJON varchar(40),
@VARIGHET varchar(8),
@FAKTURERT varchar(1),
@INNPRIS float,
@UTPRIS float,
@DB float,
@Songfaktura varchar(20)
AS
BEGIN
INSERT INTO Samtaler(KUNDENR,DATO,TID,ANR,BNR,BRUKER,DESTINASJON,VARIGHET,FAKTURERT,INNPRIS,UTPRIS,DB,Songfaktura)
VALUES (@KUNDENR,@DATO,@TID,@ANR,@BNR,@BRUKER,@DESTINASJON,@VARIGHET,@FAKTURERT,@INNPRIS,@UTPRIS,@DB,@Songfaktura)
END
GO
-------------------------------------------------------------------------------
How do I access this from Delphi with the components?
Thanks in advance
Terje