umm... According to OLEview the forth argument of the Open() method of the
Connection Object is "Options" and its default is -1.  Whenever I can I make
it a habit of specifying defaults.

-----Original Message-----
From: Julia Green [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 09, 2002 4:48 PM
To: CF-Talk
Subject: Re: Calling Stored Procedures via ADO


What's the negative one for in the Conn.Open tag?
If you want to read the table from bottom up, try some sqltext...by
ORDER DESC...

Julia Green
Julia Computer Consulting


--- Craig Fisher <[EMAIL PROTECTED]> wrote:
> I need to be able to call a Stored Procedure via ADO.  Using the
> article at
>
http://www.cfcomet.com/cfcomet/Other/index.cfm?ArticleID=98343CD9-C4F1-482F-
> BBA536DF4F33875D  I feel like I am getting pretty close.  I am having
> a
> problem with the Execute() method of the Command Object.  the
> following
> code:
>
> <cfscript>
>  Conn=CreateObject("COM", "ADODB.Connection");
>  Conn.Open(DataSource, UserName, Password, -1);
>  CmdObj = CreateObject("COM", "ADODB.Command");
>  CmdObj.ActiveConnection = conn;
>  CmdObj.CommandText = "location_codes()";
>  CmdObj.CommandType = 4;
>  rs= CmdObj.Execute();
>  conn.Close();
> </cfscript>
>
> produces the following error:
>
>
>
> Error Diagnostic Information
> Arguments expected by object does not match arguments specified in
> the tag.
>
> Error building an argument list for: EXECUTE
>
>
> The error occurred while processing an element with a general
> identifier of
> (CFSCRIPT), occupying document position (2:1) to (2:10) in the
> template file
> C:\INETPUB\WWWROOT\STAARS\QUERIES\LOCATIONSADO.CFM.
>
>
> Date/Time: 01/09/02 16:26:26
> Browser: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; AT&T
> CSM6.0)
> Remote Address: 137.190.86.113
>
>
>
> I am bestially trying to reproduce the functionality of the following
> ASP
> code (which works):
>
> <%
>
> 'open connection to db
> set conn = Server.CreateObject("ADODB.Connection")
> conn.open Application("str_Conn")
>
> set CmdObj = Server.CreateObject("adodb.Command")
>
> CmdObj.ActiveConnection = conn
> CmdObj.CommandText = "location_codes()"
> CmdObj.CommandType = 4
>
>
> set rs=CmdObj.execute
>
> %>
>
> I've used OleView to examine the execute method of the command object
> and
> this is what it says:
> Execute(
>
> [out, optional] VARIANT* RecordsAffected,
>
> [in, optional] VARIANT* Parameters,
>
> [in, optional, defaultvalue(-1)] long Options);
>
> As far as I can tell this means that all of the arguments of the
> execute
> method are optional.
>
> Does anyone have any ideas????
>
>
> Thanks much,
>
> Craig Fisher
> Macromedia Certified Instructor
> Macromedia Certified Advanced ColdFusion 5 Developer
> [EMAIL PROTECTED]
> 801-791-8251
>


______________________________________________________________________
Why Share?
  Dedicated Win 2000 Server � PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation � $99/Month � Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to