SP Problem , PLZ HELP
am 04.07.2005 16:43:01 von Renjith
Im geting an error like this when im executing the stored procedure thru ASP
page
as
Cn.Execute "EXEC ......"
Microsoft OLE DB Provider for SQL Server error '80040e14'
Line 1: Incorrect syntax near ' '.
/cr/NewRpt.asp, line 748
after the error if i copy the executing part and execute in SQL Server it
works fine
this executing workes finely in VB also.
plz help soon
Re: SP Problem , PLZ HELP
am 04.07.2005 17:15:07 von reb01501
Renjith wrote:
> Im geting an error like this when im executing the stored procedure
> thru ASP page
>
> as
>
> Cn.Execute "EXEC ......"
>
>
>
> Microsoft OLE DB Provider for SQL Server error '80040e14'
>
> Line 1: Incorrect syntax near ' '.
>
> /cr/NewRpt.asp, line 748
>
> after the error if i copy the executing part and execute in SQL
Do you mean "copy the result of response.write and execute in SQL"? If not,
you are not correctly testing.
dim sSQL
sSQL="EXEC ..."
Response.Write sSQL
Response.End
Run the page and look at the result in te browser. That should tell you what
your problem is.
> Server it works fine
> this executing workes finely in VB also.
>
Here is a better way to run stored procedures from asp:
http://tinyurl.com/jyy0
Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Re: SP Problem , PLZ HELP
am 05.07.2005 06:30:02 von Renjith
Hi
the resullt of Response.write works fine in SQL Server , VB
nothing seems to be wrong in the statement
renjith
Re: SP Problem , PLZ HELP
am 05.07.2005 12:56:52 von reb01501
Renjith wrote:
> Hi
>
> the resullt of Response.write works fine in SQL Server , VB
> nothing seems to be wrong in the statement
>
> renjith
Well, we're at an impasse then. You have not provided enough information to
allow us to diagnose your problem. Good luck. I hope you discover the
problem. Maybe it's a reserved-keyword issue -
http://www.aspfaq.com/show.asp?id=2080
If you need us to take another look at it, you need to show us how to
reproduce the symptoms. Provide the CREATE PROCEDURE statement (just the
beginning part where the parameters are declared - we don't need to see the
body of the procedure), and the code that produces the "EXEC ..." string.
And don't forget to show us the result of the Response.Write statement.
Again, using dynamic sql to execute a stored procedure is not my preferred
approach, mainly due to the difficulty of dealing with embedded delimiters
and the dangers of sql injection*. Did you read the post I whose link I
provided in my previous reply?
HTH,
Bob Barrows
*http://mvp.unixwiz.net/techtips/sql-injection.html
http://www.sqlsecurity.com/DesktopDefault.aspx?tabid=23
http://www.nextgenss.com/papers/advanced_sql_injection.pdf
http://www.nextgenss.com/papers/more_advanced_sql_injection. pdf
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Re: SP Problem , PLZ HELP
am 05.07.2005 21:38:02 von JitGanguly
You are trying to pass some parameters in the Sp and the parameter value is
NULL or blank.
Check that first and make sure you are passign right parameter
"Bob Barrows [MVP]" wrote:
> Renjith wrote:
> > Hi
> >
> > the resullt of Response.write works fine in SQL Server , VB
> > nothing seems to be wrong in the statement
> >
> > renjith
>
> Well, we're at an impasse then. You have not provided enough information to
> allow us to diagnose your problem. Good luck. I hope you discover the
> problem. Maybe it's a reserved-keyword issue -
> http://www.aspfaq.com/show.asp?id=2080
>
> If you need us to take another look at it, you need to show us how to
> reproduce the symptoms. Provide the CREATE PROCEDURE statement (just the
> beginning part where the parameters are declared - we don't need to see the
> body of the procedure), and the code that produces the "EXEC ..." string.
> And don't forget to show us the result of the Response.Write statement.
>
> Again, using dynamic sql to execute a stored procedure is not my preferred
> approach, mainly due to the difficulty of dealing with embedded delimiters
> and the dangers of sql injection*. Did you read the post I whose link I
> provided in my previous reply?
>
> HTH,
> Bob Barrows
>
>
> *http://mvp.unixwiz.net/techtips/sql-injection.html
> http://www.sqlsecurity.com/DesktopDefault.aspx?tabid=23
> http://www.nextgenss.com/papers/advanced_sql_injection.pdf
> http://www.nextgenss.com/papers/more_advanced_sql_injection. pdf
>
> --
> Microsoft MVP - ASP/ASP.NET
> Please reply to the newsgroup. This email account is my spam trap so I
> don't check it very often. If you must reply off-line, then remove the
> "NO SPAM"
>
>
>
Re: SP Problem , PLZ HELP
am 05.07.2005 22:54:50 von reb01501
Me? I'm not the one asking the question. You should reply to the OP ...
I do want to ask how you are coming to this conclusion without seeing any
code or seeing the results of the response.write ...
JitGanguly wrote:
> You are trying to pass some parameters in the Sp and the parameter
> value is NULL or blank.
> Check that first and make sure you are passign right parameter
>
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Re: SP Problem , PLZ HELP
am 06.07.2005 16:28:01 von JitGanguly
Try to pass null/zero value to a SQL and you will see this error.Well, there
could be other problem, but in thsi case most likely it is null or blank value
"Bob Barrows [MVP]" wrote:
> Me? I'm not the one asking the question. You should reply to the OP ...
>
> I do want to ask how you are coming to this conclusion without seeing any
> code or seeing the results of the response.write ...
>
> JitGanguly wrote:
> > You are trying to pass some parameters in the Sp and the parameter
> > value is NULL or blank.
> > Check that first and make sure you are passign right parameter
> >
>
> --
> Microsoft MVP -- ASP/ASP.NET
> Please reply to the newsgroup. The email account listed in my From
> header is my spam trap, so I don't check it very often. You will get a
> quicker response by posting to the newsgroup.
>
>
>
Re: SP Problem , PLZ HELP
am 06.07.2005 16:41:10 von reb01501
OK, so you're guessing. :-)
Nothing wrong with guessing, but I prefer encouraging the OP to provide
complete information so we can diagnose his problem. Guessing can lead to
wasted time.
Renjith, how are you coming along with this problem? Are you still there?
Bob Barrows
JitGanguly wrote:
> Try to pass null/zero value to a SQL and you will see this
> error.Well, there could be other problem, but in thsi case most
> likely it is null or blank value
>
> "Bob Barrows [MVP]" wrote:
>
>> Me? I'm not the one asking the question. You should reply to the OP
>> ...
>>
>> I do want to ask how you are coming to this conclusion without
>> seeing any code or seeing the results of the response.write ...
>>
>> JitGanguly wrote:
>>> You are trying to pass some parameters in the Sp and the parameter
>>> value is NULL or blank.
>>> Check that first and make sure you are passign right parameter
>>>
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
RE: SP Problem , PLZ HELP
am 13.07.2005 12:26:04 von Renjith
THANKS EVERY ONE
THE PROBLEM IS SOLVED ????
I HAVE PUT SET QUOTED IDENTIFIER ON....ON THE STARTING , BUT NOT PUT IT AS
OFF IN THE END...SO SECOND TIME IT WILL GENERATE AN ERROR.
THANKS
RENJITH