|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Can't execute a sp from the asp page...?
Hi there,
OS : Windows(obviously )Appl. tier : IIS/ASP pages Db Tier : Sql 7 PHP Code:
The highlighted stuff stored procedure should do trhe del;ete action, but fails constantly with a odbc error... Cam anyone tell me what's wrong with this asp page. I'm a DBA chipping in for my webadm who's ill. Any help/input will be appreciated. I've pasted the whole page that's why I'm not being descriptive here... I end up getting an ODBC error..apparently connection... upon punching delete the odbc error appears... Last edited by tarry : October 16th, 2003 at 08:21 AM. |
|
#2
|
||||
|
||||
|
what odbc error is it?
|
|
#3
|
|||
|
|||
|
Viewing this code from home(now) I think I see the issue in declaration. I'll try to rectify it and then will report and also on that precise ODBC error message.
Thanks for your time. Tarry |
|
#4
|
|||
|
|||
|
I've tried it but the error is...
Microsoft OLE DB Provider fro ODBC Drivers error '80040e31' [Microsoft][ODBC SQL Server Driver] Timeout expired. /alumniburo/deletealumni.asp, line 47 The error keeps comnig back.... Anyone have experience with this and what may be the underlying problem. I've check/tested the DSN connection on the IIS server to the SQL Server and it works ok. Any one...? |
|
#5
|
||||
|
||||
|
Timeout expired.
The script is taking a long time to run? The results set is very big or SQL Server is taking a long time to return anything? You can increase the script timeout in IIS under the Home directory tab on the default website, select "configuration" for the application in question and then select the options tab and the script timeout is displayed. Matt
__________________
_______________ Matt |
|
#6
|
|||
|
|||
|
Matt,
Thanks for your prompt reply... I'm gonna see at the IIS end. One more q, I saw above in the decalration Dim cmdalumn where as elsewhere it's using cmdAlumni I've changed the Dim to cmdalumni Was/could that be a jinx? The ASP thing is new to me... |
|
#7
|
||||
|
||||
|
unlikely, but add <%Option Explict%> at the top of the page, below the <%@Language statement (if you have one)
This will ensure that you have declared all variables, rather than referenced them implicitly |
|
#8
|
|||
|
|||
|
Matt,
Thru the computer management/ii service/and right clicking my required application, I can only see the connection property.,connection timeout = 900 sec..Is this a script connection timeout? I think it's the (inactive) use connection or have I misuderstood you?? Cheers... Tarry |
|
#9
|
||||
|
||||
|
That's under the website tab, click the home directory tab and then click "configuration" on the application. If you dont have an application, click create and then click configuration. then, select the options tab.
|
|
#10
|
|||
|
|||
|
Thanks Matt!
I've increased the timeout setting on the app/asp scripts option. I'll try to also see the exec plan on that stored proc on the sql server. Maybe it can be written better..? Thanks I'll report back as soon as the end user reports back... |
|
#11
|
||||
|
||||
|
How long does it take to give you a results set in Query Analyzer? Can you create a backup and try executing the query. Is the box under powered in terms of number-crunching power? Indexes? Relationships? The execution plan is normally by default good enough aint it? I'd have thought other areas might need sorting. maybe!
Matt |
|
#12
|
|||
|
|||
|
Mike,
It's a stored proc which with one input param performs... and then performs an update on 3 tables. It's really no big deal. I just heard from the user that the connection timeout expired again. I had increased the asp script timeout settings to 900 sec. (More than enough I presume) Anything else that I need to check? |
|
#13
|
||||
|
||||
|
Must be an infinite loop somewhere.
How many form elements are there in the loop? comment out the stored proc execution bits of the ASP page and make it write out each request.form item to the screen. |
|
#14
|
|||
|
|||
|
How do I debug the code then? The imput of @naw_al, which the end user does to select and to delete(or let that stored proc delete within the sql server) is al it needs to do.
The error is pounded back in a few seconds..like 10~15. I was on the phone with the user when this happened. Anyways how do I debug the code to see if the code is the problem. I'm suspecting the security issue here/connecting user has no accessgrants(somewhere) ..as the stored proc..as I mentioned above does an.... Here the DSNconnection is made with the user who's default database is the one which shoot's that stored proc... [1] update on a linked server [2] update on its own schema/inserting the rec in a active_arch table. |
|
#15
|
|||
|
|||
|
Tested this stuff in the test env
I have tested thisstuff in the test environment with representative data and it worked completely...
What else should I check and where? The sad part is that all this was part of the Project which some guys did and I joined hte bandwagon a lot later... Any takes , anyone? TIA |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > Can't execute a sp from the asp page...? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|