Link to home
Start Free TrialLog in
Avatar of andyd70
andyd70Flag for Australia

asked on

IB/Firebird Stored Procedures in ASP.

I am using the IBPhoenix ODBC Driver.

I have a Simple Stored Procedure
CREATE PROCEDURE GET_GUID
RETURNS (
    SGUID CHAR (38))
AS
declare variable s CHAR(38);
BEGIN
S = '{';
s= '{' || GUID_CREATE() ||'}';

SGUID = S;

END

Which creates a GUID.

I am trying to access this from an ASP Site with no luck.
My Asp Code look like.

connect = "data source=wsi;user id=SYSDBA;password=masterkey"

Dim guid
set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open Connect
Set sp = Server.CreateObject("ADODB.Command")
sp.ActiveConnection = Connect
sp.CommandType = adCmdStoredProc
sp.CommandText = "execute Procedure GET_GUID"
sp.Parameters.append sp.Createparameter(":SGUID", adChar,adParamOutput)
sp.Execute
guid = sp("SGUID")

I cannot seem to access the Returned Value. Please tell me what I am doing wrong.
ASKER CERTIFIED SOLUTION
Avatar of Nick Upson
Nick Upson
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial