php-windows Digest 17 Sep 2005 09:57:14 -0000 Issue 2776
Topics (messages 26350 through 26352):
Re: MSIE problems
26350 by: Bob Stout
Re: Calling MSSQL Stored Procedure
26351 by: Robert Twitty
26352 by: Alf Stockton
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[email protected]
----------------------------------------------------------------------
--- Begin Message ---
Quoting Luis Ferro <[EMAIL PROTECTED]>:
> Instead of doing a somefile.php#ref do a somefile.php?jump=ref and then
> in the somefile.php add a mix of javascript/php to perform the "jump"...
>
> That is a workaround and should work in any browser that uses javascript.
>
> Of course, if javascript is turned off the user is always stuck to the
> top of the document, which isn't a too bad degradation of
> functionality... (specially if the top of the document has links for it's
> targets).
Thanks for the reply. Should that work when the target is a frame and not the
top-level window? This is how the code I already have works, but I didn't
think it would work in a frame spec.
--
Bob Stout <[EMAIL PROTECTED]> - The 3 rules of life:
"Either lead, follow, or get out of the way."
"It's easier to get forgiveness than permission."
"Never attribute to malice what can be adequately explained by stupidity."
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
--- End Message ---
--- Begin Message ---
First, you should be using PrepareSP() instead of Prepare() to call a
stored procedure. Second, the PHP mssql extension does not appear to be
able to bind directly to a datetime parameter. If you cannot rewrite the
procedure, then you should install the odbtp extension
(http://odbtp.sourceforge.net) so that you can use the ADODB odbtp driver.
The following code will work with the odbtp driver:
$SQL = $PMdb->PrepareSP("spGetActivePromotions");
$ActualDate = time();
$PMdb->Parameter($SQL, $ActualDate, "Today");
$PMdb->Parameter($SQL, $ret, 'RETURN_VALUE');
-- bob
On Fri, 16 Sep 2005, Alf Stockton wrote:
> Mark Rees wrote:
>
> >
> >
> >The type problem in not in PHP but in SQL Server. The sp expects an input
> >parameter of type datetime, and it isn't getting one.
> >
> >http://www.php.net/function.mssql-query has the answer to this question,
> >which is to supply the parameter as varchar and use CONVERT in the sp to
> >change it into a datetime
> >
> >
> >
> As other programs, not under my control, are already using that Stored
> Procedure altering it is really not a good idea.
>
>
> --
>
> Regards,
> Alf Stockton www.stockton.co.za
>
> Good day for overcoming obstacles. Try a steeplechase.
>
> My email disclaimer is available at www.stockton.co.za/disclaimer.html
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
Robert Twitty wrote:
First, you should be using PrepareSP() instead of Prepare() to call a
stored procedure. Second, the PHP mssql extension does not appear to be
able to bind directly to a datetime parameter. If you cannot rewrite the
procedure, then you should install the odbtp extension
(http://odbtp.sourceforge.net) so that you can use the ADODB odbtp driver.
The following code will work with the odbtp driver:
$SQL = $PMdb->PrepareSP("spGetActivePromotions");
$ActualDate = time();
$PMdb->Parameter($SQL, $ActualDate, "Today");
$PMdb->Parameter($SQL, $ret, 'RETURN_VALUE');
Thank you Bob. I decided to try it without the odbtp as I only found
source files at http://odbtp.sourceforge.net which looked like they
needed building on Linux and my problem does not include Linux. ie
Neither the client nor the server is a Linux/Unix machine.
Long story short; your alteration to my code altered the results to the
following :-
InParameter($stmt, $php_var='1126950445', $name='Today', $maxLen=4000,
$type=56);
OutParameter($stmt, $php_var='', $name='RETURN_VALUE', $maxLen=4000,
$type=47);
------------------------------------------------------------------------
(mssql): spGetActivePromotions ||
------------------------------------------------------------------------
8144: Procedure or function spGetActivePromotions has too many arguments
specified.
and when I go to google to find out what "8144: Procedure or function"
really means I find Microsoft link, support.microsoft.com/?kbid=885712
which tells me :-
You receive this error message in the *Microsoft SQL-DMO (ODBC SQLState:
42000)* dialog box. This problem occurs if there are more than 16 files
in the database that you try to attach, including the data files and the
log files in the database.
Comments/suggestions please.BTW. The important part of your
correction/suggestion was the PrepareSP rather than Prepare and the $ActualDate
= time();
--
Regards,
Alf Stockton www.stockton.co.za
Q: What is the difference between Texas and yogurt?
A: Yogurt has culture.
My email disclaimer is available at www.stockton.co.za/disclaimer.html
--- End Message ---