Hello,
I am calling stored procedure in ASP page as follows : - Dim oCmdDim,confirmation,IndRecs
-
Set oCmd = Server.CreateObject("ADODB.Command")
-
-
With oCmd
-
.ActiveConnection = openconnection()
-
.CommandType = 4
-
.CommandText = "SendMsg_proc"
-
-
-
.Parameters.Append(.CreateParameter("@UniCode", adVarWChar, adParamInput, 1, "'"& request("unicode") & "'"))
-
.Parameters.Append(.CreateParameter("@DintUserId", adnumeric, adParamInput, 9, "'"& Session("userid") & "'" ))
-
.Parameters.Append(.CreateParameter("@DintOrg_id", adnumeric, adParamInput, 9, "'"& Session("orgid") & "'" ))
-
.Parameters.Append(.CreateParameter("@Gdate", adDBDate, adParamInput, 15, "'"& Request("Gdate") & "'" ))
-
.Parameters.Append(.CreateParameter("@GTime", adDBDate, adParamInput, 15, "'"& Request("GTime") & "'" ))
-
.Parameters.Append(.CreateParameter("@ProductId", adVarWChar, adParamInput, 50, "'"& Session("productid") & "'" ))
-
.Parameters.Append(.CreateParameter("@recids", adVarWChar, adParamInput, 8000, "'"& recids & "'" ))
-
.Parameters.Append(.CreateParameter("@grpids", adVarWChar, adParamInput, 8000, "'"& grpids & "'" ))
-
.Parameters.Append(.CreateParameter("@preferedGroup", adVarWChar, adParamInput, 8000, "'"& Request("preferedGroup") & "'" ))
-
.Parameters.Append(.CreateParameter("@unRegRec", adVarWChar, adParamInput, 8000, "'"& Request("textareaunreg") & "'"))
-
.Parameters.Append(.CreateParameter("@Message", adVarWChar, adParamInput, 8000,"'"& Request("textareamobile") & "'"))
-
.Parameters.Append(.CreateParameter("@DvchMsgType", adVarWChar, adParamInput, 50, "'"& Request("tflash") & "'" ))
-
' .Parameters.Append(.CreateParameter("@NoOfMessages", adVarWChar, adParamInput, 9, int(Request("NoOfMessages"))))
-
.Parameters.Append(.CreateParameter("@EmailMsgBal", adnumeric, adParamInput, 9, "'"& Request("EmailBal") & "'" ))
-
.Parameters.Append(.CreateParameter("@GrBal", adnumeric, adParamInput, 9, "'"& Request("GrBal") & "'" ))
-
.Parameters.Append(.CreateParameter("@AccType", adVarWChar, adParamInput,15, "'"& lcase(trim(session("admin"))) & "'" ))
-
.Parameters.Append(.CreateParameter("@SmsGeneral", adInteger, adParamInput,4, "'"& SmsGeneral & "'" ))
-
.Parameters.Append(.CreateParameter("@EmailGeneral", adInteger, adParamInput,4,"'"& EmailGeneral & "'" ))
-
.Parameters.Append(.CreateParameter("@vchfree", adVarWChar, adParamInput, 10, "'"& Request("Free") & "'" ))
-
.Parameters.Append(.CreateParameter("@vchnormal", adVarWChar, adParamInput, 10,"'"& Request("NORMAL") & "'" ))
-
.Parameters.Append(.CreateParameter("@invite", adVarWChar, adParamInput, 10, "'"& Request("invite") & "'" ))
-
.Parameters.Append(.CreateParameter("@status", adVarWChar, adParamInput, 3, "'"& Request("status") & "'" ))
-
.Parameters.Append(.CreateParameter("@status1", adVarWChar, adParamInput, 3,"'"& Request("status1") & "'"))
-
.Parameters.Append(.CreateParameter("@Confirm", adVarWChar, adParamOutput))
-
-
-
'On Error Resume Next
-
.Execute IndRecs,,adExecuteNoRecords
-
confirmation = .Parameters("@Confirm")
-
-
End With
-
'On Error Goto 0
-
If oCmd.ActiveConnection.Errors.Count > 0 Then
-
Response.Write("An error occured while trying to process your SP!")
-
Else
-
Response.Write("DONE - "& confirmation)
-
End If
-
-
Set oCmd = Nothing
-
In this , some parameters values are comma seperated . thus when executing this stored procedure , it throws followin error : -
-
ADODB.Command error '800a0bb9'
-
-
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
-
-
-
On this line :
.ActiveConnection = openconnection()
how to deal with this problem, or how to pass parameters within single quotes.
Regards,
"D"
1 5169
you should not have to use single quotes when you pass parameters like you do. Try it without, the act of appending parameters should allow the stored procedure to interpret each parameter as a single value even if it contains a comma. If single quotes were necessary I definitely would try it the same way you did above.
That said, the error you are reporting should not have come from that line, it should have come from the .Execute line, I don't know whether this sheds any new light on the issue or not...
Jared
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Luis |
last post by:
I'm using code similar to the following in an asp page to call a
stored procedure that does a select on a SQLServer 2000 table:
dim rs, SelectSql
SelectSql = "EXEC spSelectStuff @param = '" &...
|
by: Nashat Wanly |
last post by:
HOW TO: Call a Parameterized Stored Procedure by Using ADO.NET and
Visual C# .NET
View products that this article applies to.
This article was previously published under Q310070
For a Microsoft...
|
by: Mariusz |
last post by:
I want to write function to call another function which name is
parameter to first function. Other parameters should be passed to
called function.
If I call it function('f1',10) it should call...
|
by: Jean-Marc Blaise |
last post by:
Dear all,
I have simulated the windows MULTI application with a java program calling
the SQLTP1DL proc referenced as DB2DARI application, on Linux Intel or
ZLinux. If the proc is NOT FENCED,...
|
by: Marcin Belczewski |
last post by:
I have ASP.NET page that invokes a stored procedure in the database.
It takes about 60 seconds for the stored procedure to complete.
In web.config I have <httpRuntime executionTimeout="10"/> and...
|
by: IamtheEvster |
last post by:
Hi All,
I am currently using PHP 5 and MySQL 5, both on Fedora Core 5. I am
unable to call a MySQL stored procedure that returns output parameters
using mysql, mysqli, or PDO. I'm having a...
|
by: mandible |
last post by:
I'm trying to call one stored procedure inside another.
I was wondering if this is possible
Some ideas I was toying with is putting the first stored procedure
inside of a temp table but haven't...
|
by: .Net Sports |
last post by:
I need to call an stored procedure from an asp script, I don't need to
do an Output parameter, only input parameters on 3 vars, but I get a
"BOF EOF not true or record has been deleted" error when...
|
by: savio XCIX |
last post by:
I created the following stored procedure:
=======
CREATE PROCEDURE TBLNAME.proc_test (IN p_custnum VARCHAR(8),
IN p_zipcode...
|
by: barmatt80 |
last post by:
I don't know if this is the right part of the forum. But.... I have been working all night trying to create a web service to call a stored procedure in sql server 2008. The stored procedure calls...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |