Click here to Skip to main content
15,921,622 members
Home / Discussions / Database
   

Database

 
GeneralMS SQL Server Licencing issues Pin
Scorp1us21-Feb-03 4:23
Scorp1us21-Feb-03 4:23 
GeneralRe: MS SQL Server Licencing issues Pin
Topper Price21-Feb-03 14:42
Topper Price21-Feb-03 14:42 
GeneralRe: MS SQL Server Licencing issues Pin
Antares68625-Feb-03 0:51
Antares68625-Feb-03 0:51 
GeneralADO,VC++,AutoNumber,Access Pin
Kamesh20-Feb-03 22:43
Kamesh20-Feb-03 22:43 
GeneralProblem with SQLDMO Pin
fabjoe20-Feb-03 21:05
fabjoe20-Feb-03 21:05 
GeneralRe: Problem with SQLDMO Pin
Antares68625-Feb-03 0:31
Antares68625-Feb-03 0:31 
GeneralRe: Problem with SQLDMO Pin
fabjoe25-Feb-03 2:25
fabjoe25-Feb-03 2:25 
GeneralADO CreateParameter Pin
devvvy20-Feb-03 15:09
devvvy20-Feb-03 15:09 
I have this very weird problem - when I invoke a stored procedure from ASP, it complained that one of the input parameter was "declared" as OUTPUT but the ASP call indicated otherwise. Error message as follows:

"Microsoft OLE DB Provider for SQL Server error '80040e14'
Formal parameter '@employee_division_code' was defined as OUTPUT but the actual parameter not declared OUTPUT."

I have checked, and double checked. The parameter was defined as INPUT parameter in SQL server stored procedure. I have included both signature of stored procedure, and the ASP/ADO API call below - hope one of you wiz can help me spot a problem that I failed to spot. Please look for <PROBLEM> tag - that's how I highlight the problem.

(1) Here's the stored procedure:

CREATE PROC dbo.sproc_AddUser
@login char(15) =NULL,
@password char(15) =NULL,
@first_name char(50) =NULL,
@middle_name char(50) =NULL,
@last_name char(50) =NULL,
@email1 char(50) =NULL,
@email2 char(50) =NULL,
@tel_home char(30) =NULL,
@tel_office char(30) =NULL,
@tel_fax char(30) =NULL,
@tel_cell char(30) =NULL,
@tel_pager char(30) =NULL,
@title char(100) =NULL,
@association char(50) =NULL,
@address_unit_num char(15) =NULL,
@address_bldg_name char(50) =NULL,
@address_street_num char(15) =NULL,
@address_street char(100) =NULL,
@address_city char(100) =NULL,
@address_province char(100) =NULL,
@address_country char(100) =NULL,
@address_zipcode char(100) =NULL,
@employee_division_code char(500)='EMPLOYEE, REGUSER',
@customer_division_code char(500)='CUST, REGUSER',
@seniority_level int=0,
@cust_service_level int=0,
@bAdminStatus int=0, ********** <PROBLEM> **********
@bEmployStatus int=0,
@bClientStatus int=0,
@error_status int OUTPUT
WITH RECOMPILE
AS
...
...
...

(2) Here's fragment of my ASP script:

Set oCmd = Server.CreateObject("ADODB.Command")

With oCmd

.ActiveConnection = oConn
.CommandText = "sproc_AddUser"
.CommandType = adCmdStoredProc

.Parameters.Append .CreateParameter("@login", adChar, adParamInput, 15, Request.Form("txtLogin") )
.Parameters.Append .CreateParameter("@password", adChar, adParamInput, 15, Request.Form("txtPasswd") )
.Parameters.Append .CreateParameter("@first_name", adChar, adParamInput, 50, Request.Form("first_name") )
.Parameters.Append .CreateParameter("@middle_name", adChar, adParamInput, 50, Request.Form("middle_name") )
.Parameters.Append .CreateParameter("@last_name", adChar, adParamInput, 50, Request.Form("last_name") )
.Parameters.Append .CreateParameter("@email1", adChar, adParamInput, 50, Request.Form("email1") )
.Parameters.Append .CreateParameter("@email2", adChar, adParamInput, 50, Request.Form("email2") )
.Parameters.Append .CreateParameter("@tel_home", adChar, adParamInput, 30, Request.Form("tel_home") )
.Parameters.Append .CreateParameter("@tel_office", adChar, adParamInput, 30, Request.Form("tel_office") )
.Parameters.Append .CreateParameter("@tel_fax", adChar, adParamInput, 30, Request.Form("tel_fax") )
.Parameters.Append .CreateParameter("@tel_cell", adChar, adParamInput, 30, Request.Form("tel_cell") )
.Parameters.Append .CreateParameter("@tel_pager", adChar, adParamInput, 30, Request.Form("tel_pager") )
.Parameters.Append .CreateParameter("@title", adChar, adParamInput, 100, Request.Form("title") )
.Parameters.Append .CreateParameter("@association", adChar, adParamInput, 50, Request.Form("association") )

.Parameters.Append .CreateParameter("@address_unit_num", adChar, adParamInput, 15, Request.Form("address_unit_num") )
.Parameters.Append .CreateParameter("@address_bldg_name", adChar, adParamInput, 50, Request.Form("address_bldg_name") )
.Parameters.Append .CreateParameter("@address_street_num", adChar, adParamInput, 15, Request.Form("address_street_num") )
.Parameters.Append .CreateParameter("@address_street", adChar, adParamInput, 100, Request.Form("address_street") )
.Parameters.Append .CreateParameter("@address_city", adChar, adParamInput, 100, Request.Form("address_city") )
.Parameters.Append .CreateParameter("@address_province", adChar, adParamInput, 100, Request.Form("address_province") )
.Parameters.Append .CreateParameter("@address_country", adChar, adParamInput, 100, Request.Form("address_country") )
.Parameters.Append .CreateParameter("@address_zipcode", adChar, adParamInput, 100, Request.Form("address_zipcode") )

.Parameters.Append .CreateParameter("@bAdminStatus", adInteger, adParamInput, 4, bAdminStatus) ********** <PROBLEM> **********
.Parameters.Append .CreateParameter("@bEmployStatus", adInteger, adParamInput, 4, bEmployStatus)
.Parameters.Append .CreateParameter("@bClientStatus", adInteger, adParamInput, 4, bClientStatus)
.Parameters.Append .CreateParameter("@cust_service_level", adInteger, adParamInput, 5, CInt(Request.Form("cust_service_level")) )

.Parameters.Append .CreateParameter("@error_status", adInteger, adParamOutput, 4, 0) 'OUTPUT: error status.

'Execute the stored procedure:
.Execute()

End With

Thanks a bunch.

norm
GeneralRe: ADO CreateParameter Pin
Jon Hulatt21-Feb-03 0:36
Jon Hulatt21-Feb-03 0:36 
GeneralRe: ADO CreateParameter Pin
devvvy21-Feb-03 3:13
devvvy21-Feb-03 3:13 
GeneralDB2-to-Excel Pin
Jassim Rahma20-Feb-03 12:44
Jassim Rahma20-Feb-03 12:44 
GeneralMySQL HELL on RedHat Linux 7.2 Pin
Masaaki Onishi20-Feb-03 12:27
Masaaki Onishi20-Feb-03 12:27 
GeneralRe: MySQL HELL on RedHat Linux 7.2 Pin
Scorp1us21-Feb-03 4:30
Scorp1us21-Feb-03 4:30 
GeneralRe: MySQL HELL on RedHat Linux 7.2 Pin
Topper Price21-Feb-03 14:45
Topper Price21-Feb-03 14:45 
GeneralRe: MySQL HELL on RedHat Linux 7.2 Pin
Scorp1us21-Feb-03 14:55
Scorp1us21-Feb-03 14:55 
GeneralRe: MySQL HELL on RedHat Linux 7.2 Pin
David Wulff22-Feb-03 17:02
David Wulff22-Feb-03 17:02 
GeneralNumber of records in Access database Pin
Majid Shahabfar20-Feb-03 3:03
Majid Shahabfar20-Feb-03 3:03 
GeneralRe: Number of records in Access database Pin
Hesham Amin20-Feb-03 21:28
Hesham Amin20-Feb-03 21:28 
Generalado.net Pin
mrboljok20-Feb-03 2:27
mrboljok20-Feb-03 2:27 
GeneralRe: ado.net Pin
Solomon Wu24-Feb-03 16:48
Solomon Wu24-Feb-03 16:48 
Generalcannot found msado15.dll Pin
MemLeak19-Feb-03 10:43
MemLeak19-Feb-03 10:43 
GeneralRe: cannot found msado15.dll Pin
Darrell Long19-Feb-03 10:55
Darrell Long19-Feb-03 10:55 
GeneralRe: cannot found msado15.dll Pin
Stephane Rodriguez.19-Feb-03 11:00
Stephane Rodriguez.19-Feb-03 11:00 
GeneralHelp Please: ComboBox Control in WinForm Datagrid Control Pin
DionChen19-Feb-03 5:06
DionChen19-Feb-03 5:06 
Generalforeign key Pin
ylaine18-Feb-03 17:03
ylaine18-Feb-03 17:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.