Solved

My AdBoolean Parameter is Being Ignored

Posted on 2008-06-24
4
1,065 Views
Last Modified: 2012-05-05
Hi all,

I have the following ADO parameter but for some reason it doesn't seem to relate with my Stored Procedure:

Set cn = Server.CreateObject("ADODB.Connection")
   cn.Open strDSNless
   
   Set cmd = Server.CreateObject("ADODB.Command")
   Set cmd.ActiveConnection = cn
                     
 Dim rs2

 cmd.CommandText = "schedule_get_mailinglist"
 cmd.CommandType = adCmdStoredProc
                  
 cmd.Parameters.Append cmd.CreateParameter("@global", adBoolean, adParamInput, 1, True)
                  
 Set rs2 = Server.CreateObject("ADODB.RecordSet")
 rs2.CursorLocation = 3
 rs2.Open cmd


I have checked the name and data type of my stored procedure parameter and all seems correct....

the error I receive is:

[Microsoft][ODBC SQL Server Driver][SQL Server]Procedure 'schedule_get_mailinglist' expects parameter '@global', which was not supplied.

Does anyone have any ideas as to why it may not be working?

Many thanks,

Rit
0
Comment
Question by:rito1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 22

Expert Comment

by:neeraj523
ID: 21858959
Try this crude method for test..

<%
Set cn = Server.CreateObject("ADODB.Connection")
cn.Open strDSNless
   
Set rs2 =  cn.Execute "schedule_get_mailinglist true"
%>
0
 
LVL 1

Author Comment

by:rito1
ID: 21859827
Hi neeraj523,

thanks for helping out.

Running your code, I seem to get an error at the moment...

Microsoft VBScript compilation error '800a0401'

Expected end of statement

/schedules/test.asp, line 7

Set rs2 = cn.Execute "schedule_get_mailinglist true"
---------------------^
0
 
LVL 22

Accepted Solution

by:
neeraj523 earned 500 total points
ID: 21863348
sorry.. try this

Set rs2 = cn.Execute ("EXEC schedule_get_mailinglist true")
0
 
LVL 1

Author Comment

by:rito1
ID: 21882946
thanks neeraj523,
Got it sorted in the end. It was my fault and the spelling of parameters.

Cheers,

Rit
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
ASP Focus problem 3 71
Get hold of longitude and latitude in iframe string 11 51
alert(innerHTML); 8 38
Validating Date Part2 2 27
Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question