I have code that inserts data into a db.What I would like to now is make sure that all textboxes have been filled out before inserting the data into the db. Moreover, send the user back to the page with the incomplete data, but with the completed data in the textboxes.
I have a record set (rs) that contains 25 barcodes values that I set to true in a cookie. (see code section below)
If I read the cookie from within the same page that created it, I see all 25 values. But if I redirect to another page and read the cookie only 18 of the values remain.
Even though I load the same 25 barcodes at login, the 18 that remain can differ each time.
If anyone can help figure out why I am missing data in the cookie, I would appreciated it. The cookie size is only 2k.
Here is the section of code i am using to create the cookie. Hopefully, I did not make any typos when I retyped it.
while not rs.eof response.cookies(cstr(rs("code"))) = "true" response.cookies(cstr(rs("code"))).expires = dateadd("d",1,date) rs movenext wend
Here is the section of code i am using to view the cookie.
for each cookie in Request.cookies if not request.cookies(cookie).haskeys then response.write "<br>" response.write cookie + " = " + request.cookies(cookie) else for each key in request.cookies(cookie) response.write "<br>" response.write cookie + "( "+ key + ") = " + request.cookies(cookie)(key) next end if next
I need to have a table with 3 fields whereby the user can input the data and insert into my database using this website. However, I need this table to be dynamic so that after the user input the info for the first row, the user can click on add another row button and another blank row comes out. then the user can input the info for the second row and so on.
I am using ASP in the end to insert the data. I need some advice on how to create this kind of table where the user can click on one button to add another row and then able to insert all data in the entire table into database using asp.
I will be eternally greatful if someone can provide snippet of code, URL or reference material that shows how to display data in a "n colums * n rows" format.
I am new to ASP and have looked everywhere that I could, but I have not found an example where data can be formatted to be displayed in a 3 * 4 foramt, like many of the professional sites would do (actually rows and columns can be any number of rows and columns) All the examples that I have seen, show data displayed in a top down format.
I'm trying to pass a piece of data i get from a query using a different form's passed values. This is how I get the data into the new form and how I try to pass it to the next asp page query.
The value='<%=oRS(ML_Number")%>' generates a real value like '2403943' - and the field I'm trying to use this value in the qry is expecting a number. But even passing the number without the single ' at both ends generates the same error message. Code:
What i'm trying to do is delete away some rows of data in a database when a session ends. The codes are shown below. The problem is why the the database dont get deleted even after i set the timeout to 1 (waited for more than 1 minute) or after the script called the Session.Abandon? Code:
I am currently working on a project and i need to have drop down menus on a form which include data from tables in a database. There will be a number of drop down menus on this form as well as text boxes. I'm struggling with the code and need to know how to code a drop down menu that would include all the records from a drop down menu.
Is it possible to use all the values in the form, including the drop down menus to insert the values into a relational database. I'm assuming i would have to use variables to pass the information into the database using an SQL insert, but i am once again unsure how to code this.
I'm trying to include a value from a text file for the txRate variable in the code below. I tried using the include function as shown, but the double quotes are of course killing it. I don't want to use a data base to get this value, I just want the info from a text file. Can anyone suggest a solution? Code:
I'm trying to include the data from a text file for cSalesTaxRate, cStateFullName and cStateAbbreviation values in the code below. I don't want to use a data base to get this value, I just want the info from a text file. Can anyone suggest a solution? ....
I have a problem here, dealing with zero. When i insert into a SQL database a value, say 4.50, through an ASP, it will display in the SQL as 4.5, instead of the value 4.50 i entered. Therefore, when i retrieved the data from SQL, it will only return and display 4.5 IS there any way whereby i will get 4.50 instead of 4.5?
We created an asp.net 2.0 app, which sends smtp email using System.Web.mail. The app is in an IIS 6 application pool isolated to 2.0 apps on a 2003 server.
The app worked fine for a few days; recently however it began failing when sending to external addresses (it works fine if the recipient is inside our internal domain).
Comparing the logfiles, I notice when it was working both versions of the CLR appear in log entries, for example:
I am running Sun One ASP v 4.0.2 on Apache 2.0.x on Win XP Home. I noticed that Sun One Asp doesn't come with components such as AdRotator, Content Rotator, Browser Capabilitles, etc. Is there any way I can install all these components on Win XP Home. For me upgrading to Pro is not an option.
I have a record set with the ItemNo field with the data type as Text. In the record that I have, I want to find the missing number in the series
for example: 1 3 4.1 4.2 5 missing number is 2.
How can I display the missing number in the browser or give me a return value that notifies me that there is a missing number in the series. Is there any function for that? Or how can i do that using a loop?btw im using ASP Classic and MS Access Database.
i've a problem here. everytime a user click on "approve" button, they'll always get database error. and when i check the error log, there are several fields that have missing characters, which results in database error.
Is there a way I can test if an image file exists before displaying it?
I have a database that has an image field in it that users enter a filename into. Is there a way for me to check using an "if" statement that the file is actually on the drive before displaying it? ie:
<%okimage=(rsFile.Fields.Item("image").Value) If okimage='actually on the drive' then%> <img src='(rsFile.Fields.Item("image").Value)'> <%else%> <img src='noimage.jpg'> <%end if%>
How do I redirect a non existing image link on my server to another image?
On a page in "Server A", there's this tag: <img src="image_url_on_Server_B" >
suppose I want to remove the image from "Server B", and the tag above will display a different image, which was redirected due the absense of the original image src.
Does anyone know how I can detect if a image is missing from the server before the browser tries to render it, I guess this would have to be done via some sort of preloader, the problem being I am the site in question has around 30,000 images and keeping on top of missing images is a impossiblility.
I got the following error when access an asp page.
Response object error 'ASP 0185 : 8002000e' Missing Default Property /downtime_category-old2.asp, line 0 A default property was not found for the object.
I keep getting an error message: missing right parenthesis and I cannot for the life of me figure out why. Please help me find the problem! It may simply be that I've been staring at the code too long and I'm missing something obvious.
I am doing database connectivity with Microsoft Access database and Using ASP. I am using insert into statement as query but getting an error as below: Error Type:
Microsoft JET Database Engine (0x80040E14) Missing semicolon ( at end of SQL statement.
Even if I put ; at the end of statement it gives same error:
How do I set up a website that if the www. prefix is absent in the request to do a redirect such that the www. is present. For example, if someone types in just domainname.com can I redirect them to www.domainname.com? Would I do this in the global.asa file?
we have a web system whena user submits a form, it's take to a page... if the user didn't fill in a particular form properly then resulting page tells them so. they then go back and fill in the remaining fields.this works for all but 1 user whose values disppear totally, having to do it all again.has he got his computer set up differently?
I have a problem where form values go missing. The are several forms on one page with indivdual names (i.e. form1, form2) but with the same fields. Whenever the form is submitted via post the values disappear. It only happens on this one particular page.
The odd thing is that if I do a response.write with the variable and then a response.end write after it it shows up perfectly. The page is just a basic record update page. If I do a response.flush() it works as well (up until the redirect). I am leaning towards a response buffer problem but still don't understand why it is happening.
I am trying to set my windows xp pro system up so that i can write and test . asppages. I have followed the instructions given by www.w3schools.com to install the internet information services components. however, it says that I should then get an icon for ISS on the taskbar that will allow me to press 'start' so that my asp pages will work, but I have no such icon. I have tried reinstalling several times but with no change.
I am using CDONTS in an ASP program to accept input from a Form and send an E-mail. The form includes the following as well as some other information :
From (the name of the sender) To ( the name of the recipient) From E-Mail ( the senders E-Mail Address i.e. the Reply to address) To E-Mail ( The recipient's E-Mail Address )
I am having trouble with two properties. What property do I use to set the From (the name of the sender) ? What property do I use to set the From E-Mail ( the senders E-Mail Address i.e. the Reply to address) ?
I have some .asp pages that uses javascriptfile and it works fine in Windows 2000 with IIS 5.0 Now I have changed and run on Windows Server 2003 and IIS 6.0. When I run the .asp pages the IE (6.0) complains on the javascript about missing.
I first noticed this in my own app. Images would show up missing [red X] randomly on IE 6.0.2800.1106 on Windows 2000 server.
I then was able to repro this problem on Microsoft's website!!! The page I used was http://www.microsoft.com/windows/ie...sp1/default.asp After pressing [F5] to refresh the page six times, I noticed missing images on the page.
This problem seems to be very reproducible. I coded a sample ASP page which references the same images 10 times on the same page. Loaded in IE. Upon pressing [F5] several times, the images will be identified as missing [red X]. Refresh the page again, it's fine.....etc.
I'm up-todate with all latest MS patches. Has anyone else seen this problem?