<% Dim cmdUpdate, objRS Dim MfgName, MfgAbrv, intOutput Dim CONN_DSN CONN_DSN = "DRIVER={MySQL ODBC 3.51 Driver};SERVER=localhost;DATABASE=test;USER=root;PASSWORD=;OPTION=3" Set cmdUpdate = Server.CreateObject("ADODB.Command") With cmdUpdate 'Set up command properties .ActiveConnection = CONN_DSN .CommandText = "spInsertMfg" .CommandType = adCmdStoredProc 'Add input variables .Parameters.Append .CreateParameter ("_MfgName", adVarChar, adParamInput, 100,"Test Company") .Parameters.Append .CreateParameter ("_MfgAbrv", adVarChar, adParamInput, 5,"TC") 'Add output variables .Parameters.Append .CreateParameter ("_NewMfgID", adInteger, adParamOutput) 'Execute the stored procedure .Execute 'Extract the output variable intOutput = .Parameters("_NewMfgID") End With 'Display the result Response.Write(intOutPut) %> Test
<%=CAT_heading%>