I am using a stored procedure to insert set of values to a table.I am generating or calculating the value of the primary key and inserting that record and i need that value to use in my application so is there any possibilty to return a value from storedprocedure to asp application.
what i am using to do is creating a #temp table and inserting that value in the sp and then opening that value in the asp application and droping that table, but i hope it is not a efficient method.
I updated to aspx last three month,after developing serveral applications,Idecided to downgraded to asp, following is my reasons: 1.in ASPX,the page format is hard to control,in ASP u can change every html as u like ,but in aspx, a aspx control decide the page format,and its hard to change the format.
2.ASPX is said to be faster that asp, but it is based on too-often communication back to the server,for example,u click a radio a button,there is new page request, but in reality,such a communication is bandwidth-consuming and time-consuming. the user only need to submit the form, and the exchange between IE and Server was minimazed. the Speed of ASPX is not useful for most sites, for bigger sites, the speed increase is singnificant,but for small sites with less traffic, the speed of ASP is quite enough.
3.ASPX is based on Object Orinted Programming, but in most small sites, Procedure orinted programming is used, we never build objects, and POP is more efficient.ASPX is for three-tiered structure with a single layer of business logic component, but in reality, most of us used two-tier structure,that is Presetation layer and Datalayer, we can layout the page and change the database in a single page, quite effienct too.
I want to return a 404 response from an ASP script (IIS 5).
Response.Status lets me set the response string, but if I don't include any HTML text myself, the result is an empty page.
Is there a way to 'redirect' it to the server's default 404 response, as if the URI really doesn't exist, but without really redirecting it so the URL isn't replaced in the browser's address bar?
I am trying to replace a huge chunck of code that currently I incorporate with an #Include directive. The program rarely has to flow through that code, so I thought it would be better if I used Server.Execute. I found I can pass data TO the called asp file by creating an HTML <input> and erading it after I get there. However, I also need to read back ONE variable that the called file must set. I cannot figuer out how to do that. My backup positions are (1) I can keep on using the #Include technique, and (2) I can use a database to bridge the gap.Isn't there a way to carry data BACK TO the calling asp file FROM THE CALLED asp file?
When a user logs in, I want to redirect them to the page that they were previously on. How do I do that? I already have the login page working. I just need to edit the redirect part.
There is an access database and asp page .That asp page opens connection with that database,And opens a recordset online..
Is there any way that this opened recordset can be returned to Vb6 application which requested that Asp page to open connection and recordset and return some result.
I know there's a way to do this - well 99% sure anyway - and seem to remember reading an article or tutorial about how to do it but I'm not having any luck finding it. What I need to do (using MySQL & ASP3) is to find all rows with "X" as a non-unique ID - there may be 30 or so total - and grab them to be archived in a CSV file before deleting the record from a DB.The reason I want to avoid hardcoding the field names is that they're going to change with moderate frequency.
I just need to understand how the following line returns its values.Code: Dim Var For each FormElement in Request.Form
Var = Request.Form(FormElement)
Next You see say I have 5 form elements on an html form.
Element One Element Two Element Three Element Four Element Five I know that it is not checking the names of the elements and producing the results in that order, I know its not running through the Elements top to bottom on the form.
So in what order does FormElement return the values and based on what?
Code: function findcinemaid(nameofthecinema) findcinemaid = "select cinemasid from cinemas" &_ " where brand = 'tgv' and cinemaplace2 like '"&nameofthecinema&"'" set cinemaidfound = objconndb.execute (findcinemaid) optainedcinemaid = cinemaidfound("cinemasid") end function
My SQL statement won't return results where any field in a record is blank. What can I do to fix this?
strSQL = "SELECT * FROM newarchive WHERE Program_Title LIKE '%" & program & "%' AND Year_Aired LIKE '%" & yearA & "%' AND Sponsor LIKE '%" & sponsor & "%' AND Month_Aired LIKE '%" & monthA & "%' ORDER BY ID"
It gets its values from a form where some fields can be left blank. If the record itself does not have a blank field, the search will pick it up. But if the record contains a blank field, then it won't be selected unless it matches the Program_Title data.
I cannot use the OpenTextFile method, it's never return and I get no error message! Setting Response.Buffer=False, has no effect. No matter if I use it ForReading or ForWriting, it never return. In the following code, the problem occurs at line 3.
aFileName = Server.MapPath("WEB_PROD.htm") set fs = server.CreateObject("Scripting.FileSystemObject") set fso = fs.OpenTextFile(aFileName, ForReading, False) s = ts.ReadAll ts.Close set ts = nothing Response.Write s
How do you return the highest value in a recordset of maybe 100 records?Is it necessary to run 2 recordsets?I was hoping it was as simple as Max([Price]), but no luck.
Does anyone know of any issues interacting with asp pages from within Flash when you use Control>TestMovie ? i.e. When using a send and load, Flash seems to want to open my asp file (and return the contents in Flash) rather than run it and return a name/value pair as I'm expecting.
This is an example of the code I have when a reply to a topic is posted (before its inserted into the access DB).An enter till displays as a space though.
I've got an Access database with a memo field with large amounts of text in. In Access forms the text appears with line breaks where the enter key has been pressed. I'm using ASP to display this content on a simple webpage but want it to appear with the same line breaks as in the Access forms.
This is the code that I've got but it doesn't seem to work.
I need to can a function in a COM object that returns a record set and then I need to display the record set. Any ideas of how to return the record set tp the asp page?
can I return a recordset through a function in asp? and Suppose there are two buttons in asp. I want if I presss the first button then it should go to page 1.asp and if I press the second button then it should go to page2.asp. Is it possible?
I have a stored procedure that builds and sends an email using xp_sendmail. It is called after the user makes a change to a form (it tells the support centre that a change has occurred.)
The last bit of my SP is this: -- It fails if it has no recipient list if isnull(@recip, '') = '' set @recip = @supportemail
declare @rc int -- have also tried changing it to bit
/* Return Code Values 0 (success) or 1 (failure) */
select @rc return @rc If I call it through query analyzer, @rc is 0 and I receive the email. If I call it through my ASP page (which worked earlier), cint(rs.fields(0)) is -1 and I do not get the email.
set rs = ConnObj.Execute (strSQL) writeline "<P> Result: " & cint(rs.fields(0)) '0 (success) or 1 (failure)
(All variables are declared.)
It was working earlier, I had proven it... I thought it was the return @rc line that was doing it and was just keeping in select @rc for debugging. When I was ready to move on, I removed my debug statement, and then it started failing. I've put it back in, but it still fails, so I must have also removed something else, or changed something, or something.
I'm at wits end. It still works perfectly through Query Analyzer. But not ASP.
Is there a way to see all the post data that is sent an .asp page. I am working on a page that is being returned from another application and I would like to know what data I can work with.
im trying to create a function that accepts a sql statement as a parameter, makes a db connection, returns a recordset, and inserts all items from the recordset into a data dictionary - then i want to set the value of my function equal to my newly created dictionary of items from the recordset - this is where im having a problem. is it possible to set a function equal to a dictionary? i cant seem to make this work and it seems that this should be possible.
When ever i try to search for a number in a form to bring back the customers info i get no result returned! However the customer exsist in the database. What could be the problem?? Code:
I am doing a check on wether or not all of the inputs were filled in on a form. If not, I want it to basically just go back and not reload the previous page and resend the data and such. Just go back, fill in the field, and re-submit.