Finish Execution Of Script
This is backwards of what I usually want--normally if you have a long-running ASP script, it's a good idea to check to see whether the client is still connected so you can cancel execution.
However, I have a script that absolutely MUST finish one it's been started--is there a way to cause the entire script to execute, even if the client disconnects in the middle of the process? It doesn't matter if the script returns anything to the client, but once it starts saving values to the database I need it to finish .
View Replies
ADVERTISEMENT
An ASP script written in ASP.NET has worked fine on one computer, and since it has been moved to another, it doesn't.
The part that does not work deals with executing CMD.EXE. Here is a part of the code:
System.Diagnostics.ProcessStartInfo psi = new System.Diagnostics.ProcessStartInfo("cmd.exe");
psi.UseShellExecute = false;
psi.RedirectStandardOutput = true;
psi.RedirectStandardInput = true;
psi.RedirectStandardError = true;
psi.WorkingDirectory = @"c:SOME PATH";
System.Diagnostics.Process proc = System.Diagnostics.Process.Start(psi);
System.IO.StreamReader sOut = proc.StandardOutput;
System.IO.StreamWriter sIn = proc.StandardInput;
sIn.WriteLine("SOME COMMAND LINE PARAMETERS");
...and instead of executing like it did on the last server and displaying the output, it creates a web page with the following output:
Microsoft Windows [Version 5.2.3790]~(C) Copyright 1985-2003 Microsoft Corp.~~c:SOME PATH>SOME COMMAND LINE PARAMETERS"~~SOME PATH>EXIT
...followed by the rest of the web page as it did before.
What I figured is that for some reason this script on the new server instead of executing the command, it just sends it as an output to HTML.
I have tried to readjust .NET security, then to adjust the folder permissions (I gave EVERYONE permissions to all the needed folders). Nothing helped.
View Replies
View Related
I have got a problem executing a query. The driver indicates an error in Internet Explorer : No value given for one or more required parameters It refers to the recordset definition. I have tested the query in my DBMS, it works.
SOURCE :
Dim objConn
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source= " & server.mappath (BDname) "
Dim StrSQL
StrSQL = " SELECT NOM FROM ATTRIBUT WHERE LIBELLE = TRUC"
Dim rcdSet
rcdSet = Server.CreateObject("ADODB.Recordset")
rcdSet.Open StrSQL, objConn , adOpenForwardOnly, adLockPessimistic
View Replies
View Related
I currently have an asp page that ask for an email address and then with selection values runs a stored procedure.
Everything runs fine but the concern is that with enough records the processing limit will be exceeded by the web server and it will cause the page to crash.
Is there a way with ASP and MSSQL to send a request to process a stored procedure but have the processing of the asp continue while the sql runs its cousre? My sp will already email the user when processing is complete I just need the asp to send the request for it to be run but not try and run it while the next page loads.
View Replies
View Related
The statement was made that the following code works.
Is This ture?
stringa = "response.write 1"
Execute(stringa)
View Replies
View Related
Timed Execution for Access Database?
I was reading a book about access databases and sql, when i came upon the time execution part it simply said it could be done but did not go into details as to how. Does anyone out there know of a way to produce a time execution with a access database?
ex: ability to set an email to be sent out on the 1st of january at 5pm, and on that date/time it would send it out. I know that you can simply have a asp page check the time when opened and if it's the correct time use a function to send it, BUT is there a way to do it with out having to go to the page on that time???
View Replies
View Related
Is there a way to execute sql queries besides using recordset? If so, can someone provide me with links to materials i can read online or post an example?
View Replies
View Related
I have an asp page that contains a simple insert statement and redirect i.e.:
Page1.asp
<%oconn.execute "insert into table 1 values(1)"
response.redirect "newpage.asp"
%>
I have to add some code to it to not allow execution of this script if the page was called from the <img> tag i.e.
<img src=http://webname.com/page1.asp width=1 height=1>
The page should be opened in browser in order for the script it contains to be executed. How do i acomplish that?
View Replies
View Related
i do have a little problem.....i have 2 difrent functions in my asp pages. function1 and function2.
funktion 2 has to be executet 15sec after function 1 had been executet.how can this be solved in ASP, and is it impossible.
View Replies
View Related
How do I execute a users program from a web page? When a user goes to a webpage - I want a link on that page that will execute a program on the users local hard drive - like say...notepad.exe . Everything I have tried will only execute it on the server.
View Replies
View Related
I have a problem: I have an ASP page who takes a lot of time in execution, but I want to "abort" it when the user make click in a link. I have heard I can use the Response.IsClientConnected, but I am not sure if this will work.
View Replies
View Related
how can i stop execution. in betweeen a few lines of code. i dont want the complete execution of code and in middle i want to stop?
View Replies
View Related
In an asp file, the statements are like this,
1. HTML Tags
2. Javascript
3. VBScript
4. HTML Tags
5. asp coding
6. Javascript
7. VBScript
8. asp coding
9. HTML
tell me the sequece of execution in an asp file.
View Replies
View Related
I am doing a search application in ASP with SQL Server 2000. I am using a third party DLL to fetch the matched records in 1 sec, it’s working fine in the local machine.
I tried it in following OS
Windows 2000 Sever
Windows 2000 Professional
Windows 2003 Sever Standard Edition
But my client server is Windows 2003 for Small Business Server. My code is not working in this server. I don’t think this may be an OS issue This is the code I have used for search:
SELECT {score},* FROM tbl_customers_detail WHERE {udv001_index=0 order by f_order.FakturaNr desc,score}
Here score is the option given in the tool (Third party tool). This score is used to arrange the matched records in either ascending or descending order.
tbl_customers_detail – Table (It contains around 6 lakhs records)
f_order – is the order created for the field FakturaNr (This order is used to pass the particular filed as an argument for the dll.)
but I am receiving the following error
Microsoft OLE DB Provider for ODBC Drivers error '80040e37'
[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name 'TBL_CUSTOMERS_DETAIL'.
/admin/searchmore.asp, line 136
I have connected with the exact DB contains the table tbl_customers_detail.
View Replies
View Related
Basicly, when the page is in bad performance, the user will feedback to me, and later I tune it for better performance.
Is there any way or software to trace all the ASP pages' execution time in my site, so that I can tune it before user's feedback and have an overview of all my pages execution?
View Replies
View Related
I'm using Asp 3.0 and windows 2000 and SQl server 2000 as back end My problem is every day morning 8 i want to take some data from the data base and send a mail to some mail ids which i retrieve from the database.
I want this to be executed at 8 Am every morning automatically. Is there any way to schedule the execution of the asp page at a particular time. Or any other ways r there like using vb script?
View Replies
View Related
I have this command-line which I do execute it manually.I am curious if anyone can help to execute the command-line from an asp page using vb.
View Replies
View Related
when I create a function like this one :Code:
Function fctCheckEmail(conn, email)
Dim rsEmail : Set rsEmail = Server.CreateObject("ADODB.RecordSet")
rsEmail.open "SELECT dbo.fctCheckEmail('" & email & "')", conn
fctCheckEmail = rsEmail(0)
Set rsEmail = Nothing
End Function
Im closing the rsEmail object at the end of the function, after returning the function value. Is the rsEmail Object will be actually close or the code will execute the return value and skip the rest of the code ?
View Replies
View Related
how do i get the time spent for an ASP script to execute ?
View Replies
View Related
I have a question about scheduling an ASP page to execute for example once a day. The page looks for any newly added images and creates resized images and stores them in a specific folder.
What I want is to be able to schedule this to run every day so that the resized images are automatically created, rather than having to run the page manually everyday.
View Replies
View Related
I have written a few functions that are used on several pages throughout my site and am wondering what a good exection time might be (generally). The inital page a user is faced with after logging in pulls data from several different tables and displays 40 rows all together.
The execution time for this particular page is the slowest at approx. 950 ms to 1400 ms.
This seems awfully slow. This is probably because I am executing 10 different stored procedures instead of one (I thought it would be too big of a challenge to write a single select statement and parse through all the data). What sort of execution times are acceptable to most of you? What do you usually shoot for?
View Replies
View Related
I have a pure asp (Vbscript) page that manipulates data between MSAccess and
SQLServer2000. I'm trying to use the Scheduler app on the IIS server to run
this page nightly but there must be a better way of doing this.
How can I make my code in to an object and install it on the server and have
it schedule to run nightly?
Below is the code:
View Replies
View Related
Is there an easy way to determine how long it took a particular page to execute?
View Replies
View Related
I was wondering if anyone knows if there is a way to replace multiple items in ASP in a single execution of the function?
Consider this issue:
mytext = "this is not it"
mytext = Replace(mytext, "s", "<strong>s</strong>)
mytext = Replace(mytext, "n", "<strong>n</strong>)
This would produce:
thi<stro<strong>n<s/trong>g>s</stro<strong>n</strong>g> i<stro<strong>n</strong>g>s</stro<strong>n</strong>g> <strong>n</strong>ot it
While it would ideally produce: Code:
View Replies
View Related
I'm looking for a solution for the following problem:
I created ASP code to convert an URL such as:
http://localhost/mypage/category_20/article_15/
into the following URL:
http://localhost/index.asp?page=myp...20&articleid=15
Now, the first URL is submitted by the user. The second one is the real URL,
but not visible for the user. This one should be handled by the web server
internally.
I thought I could accomplish this task with server.execute or
server.transfer, but none of them can handle querystrings. Is there another
way to do this?
Are there perhaps any COM objects? (This will be my last choice, because the
whole system should go running on an iASP (instant ASP) server too if
possible)
View Replies
View Related
I'm writing an application which allow user to manage several mobile/fixed line accounts. The situation that I have now is this:
1) User choose the accounts that he want to manage (it is unlimited number of accounts, could be only 1, could be 1000, could be 10000)
2) He choose from a variety of actions to perform, in my scenario, I'l say he wanted to make changes in the Value Added Service (VAS) section (this is the part that takes the longest time to process the script, there are 27 options in this section)
3) The user will then choose whether he wanted to ADD or CANCEL the VAS that will affect all the previously selected accounts and click on submit.
4) My script will then check whether this user did any transaction before on the same day, and whether if he did the exact same action (says this morning he had perform VAS - ADD to an account, he can't do it again on the same day)
5) If no error detected, my script will then insert all the records into tables.
Now, my biggest problem is in task 4 and 5. These 2 part take the script a very long time to execute. For a transaction that have 50 accounts, it will take me about 72 seconds to have it complete and a staggering 602 seconds when I tested with 500 accounts.
I tried to use MSSQL indexing features but it doesn't seems to work the charm for me or maybe I did it the wrong way. What happens in my script during Task 4 was checking throught VAS Transation table for each selected accounts. This means my loop look something like this: Code:
View Replies
View Related
I have a ASP code that will query a server 200. Nothing will be displayed on the browser during this time, which could last upto 5 minutes. Is there a way to inform the user of the status of my ASP code?
View Replies
View Related
Is ASP page compiled or interpreted by the web Server and what about the internet explorer how it deal with HTML and other realted pages?
View Replies
View Related
Any some tools or sample codes drop down asp script execute time and
database connection time ?
View Replies
View Related