DELIMITER //
CREATE PROCEDURE Proc_Test (IN Lang_param VARCHAR(10),
OUT ID_param int)
BEGIN
SET ID_param = 99;
END //
DELIMITER ;
CALL Proc_Test ('eS', @myID);
SELECT @myID;
<%@ Language=VBScript %>
<%
Option Explicit
Response.Buffer = True
Dim Hostname, Username, Password, Database
Hostname = "localhost"
Username = "baseline-user"
Password = "xxxxxx"
Database = "baseline"
%>
<html>
<head>
<title>Baseline Connection</title>
<style type="text/css">body {font: normal 11px Arial}</style>
</head>
<body>
<%
Const adCmdStoredProc = 4
Const adParamInput = 1
Const adParamOutput = 2
Const adInteger = 3
Const adVarChar = 200
Dim Command
Dim Connection
Dim ConnectionString
Dim myLang
Dim myID
Set Connection = Server.CreateObject("ADODB.Connection")
ConnectionString = _
"DRIVER={MySQL ODBC 3.51 Driver};" & _
"SERVER=" & Hostname & ";" & _
"Database=" & Database & ";" & _
"UID=" & Username & ";" & _
"PASSWORD=" & Password & ";" & _
"OPTION=3;"
Connection.Open ConnectionString
Set Command = Server.CreateObject("ADODB.Command")
Set Command.ActiveConnection = Connection
Command.CommandType = adCmdStoredProc
Command.CommandText = "Proc_Test"
myLang = "en"
Command.parameters.Append Command.CreateParameter("@Lang_param", adVarChar, adParamInput, 255, myLang)
Command.parameters.Append Command.CreateParameter("@ID_param", adInteger, adParamOutput, 4, myID )
Command.Execute()
Connection.Close()
myID = Command.Parameters("@ID_param")
Response.Write(myID)
%>
</body>
</html>
Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.
When asked, what has been your best career decision?
Deciding to stick with EE.
Being involved with EE helped me to grow personally and professionally.
Connect with Certified Experts to gain insight and support on specific technology challenges including:
We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE