Saving Data On Form
I want to display multiple records on a form. The user has the choice of editing 1 or more records and then saving the changes. What would be the basic code I need to save the changed records? How would I capture the individual changes?
Right now the only thing that I can get to save is one record per page, not multiple records on a page, because the request.form variables come in in an array format when I put more than one record on a page.
View Replies
ADVERTISEMENT
i have been trying to save data collected from a form to a access db. The problem is that whenever the page refreshes the asp script to save the data is executing. how
can i make sure that the insert statement is executed only if the button is clicked.
View Replies
View Related
I have been playing with some things and with lots of help from Doug and Techniweb I have a script that parses data from a sports web page and returns the results of a table with all the html stripped out - or most of it anyway.
Now I have been working on saving the info to a file so that I can input it to my DB. As far as I can tell the script info is in an array called "myarray" and I have come up with the following code to try and save it:
if Not objFSO.FileExists("nbastats.txt") Then objFSO.CreateTextFile(Server.MapPath("nbastats.txt"))
Set objFile = objFSO.GetFile(Server.mapPath("nbastats.txt"))
Set objWrite = objFile.OpenAsTextStream( 2,-2 )
'Response.Write( myarray )
'Response.End()
objWrite.Write( myarray )
objWrite.Close()
Set objFile = Nothing
Set objWrite = Nothing
If I change obj.write and response.write to any of the other named process of the script i get results - obviously they are not completely parsed. When I try it as it is above - which should be the completley parsed data. I get this error:
Microsoft VBScript runtime error '800a000d'
Type mismatch: 'Write'
/scrapes/nbaleaders.txt, line 52
Line 52 is in bold.
View Replies
View Related
Does anyone know a website with a guide on how to upload binary data to a MySQL database using ASP?I have a script that i spent a lot of hours on getting to work,but after i upgraded my MySQL server it doesn't work anymore
I'm just getting an error from the odbc driver(upgraded from 2.5X odbc driver to 3.51X):
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Driver Manager] Invalid string or buffer length
I'm trying to do the upload via AspSmartUpload,with a script that opens the record and uses .AddNew to the recordset.
View Replies
View Related
I have an MS Access database within the same folder as the web pages on my IIS server. I input data into the forms but the data isn't being saved to Access. Is there a problem with this code?
View Replies
View Related
Is there a way to save post data or post data from a redirect like this: Response.Write("<meta http-equiv=""Refresh"" content=""4; URL=AdminSelectAction.asp"">") If there is not, I'll have to spend a LOT of time coding in session variables and what not.
View Replies
View Related
I am a Begginers in ASP programing, so I've been reading some tutorials and making some programs. The've been working son fine, until I begin working in database access, saving/retrieving data in reports.
I make a program to save data, and I call a friend that knows ASP and ASP.NET asking why I cannot save data in the tables if the programs does not vah errors, and he told me "You just have to go to the folder inside of the wwwroot, select properties->Web sharing" and share this folder putting write permisions". OH! this works very good, and I could save data in access table, and some reports.
A few days ago I tryied to do a form saving data in access table, but It doesn't work.
I tried the solution a friend of mine gived to me, but id doesn't work, I reinstalled IIS and it doesn't work neither.
View Replies
View Related
Iam facing a problem in saving a particular form to ms access datdabase. Iam preparing an enquiry form and want to host it onto the company's website, but Iam not able to save the form to a database. The code is as follows: Code:
View Replies
View Related
I'm currently working with an ASP page that populates rows based on a
query for course data by using a DO WHILE NOT EOF loop.
An improvement I'm adding is a dropdown populated by query which shows
each course number, so that the user can populate that course page
with data from a previous course.
My question is: once the data from the previous course is populating
the current course page (after being selected from the aforementioned
dropdown), how can that data be saved to the current course's row in
the table? I've tried pulling the result.querystring to get the
CourseID of the current course, but for some reason the changes don't
save.
Would there be a better way to copy data from one row to another in a
table? I am wanting the user to be able to preview the data as it
populates the form fields before saving, if possible.
View Replies
View Related
i have built an interface for template making. i am using a simple form with a text area and submit button to save the code, i want to show in a template page, into the database.
I also use the same textare to view any code saved to the database for a specific page.
THE PROBLEM - i have to save a
response.write("<textarea..............></textarea>")
the minute i paste it into the textarea it saves it fine but shows it wrong as if once it reads the </textarea> in my saved code the main page 'closes' the main textarea . i.e. the rest of my saved code is shown as part of the page - and its not pretty!
View Replies
View Related
When I try to save any ASP page, I get the message that "The page will not save correctly". Even though I go ahead and when I go offline the space of images is blank.
I have this website also where I am using ASP pages and my users are facing the same problem. HTML page is created but images are not saved.
What changes are required in ASP code so that images are also saved.
View Replies
View Related
I have a form that has the option to upload a file at the bottom. If you select a file it works fine but if you leave file selection blank the forms bombs. This is not how I want it to work. On the form you need to use ENCTYPE="multipart/form-data" in the form tag.
On the processing page I need to use Set to assign a variable to the form data. I tried using IF on the variable assigned to the file path but it bombs out telling me "This function is not supported". Is there any other way I can check to see if curQes has a value assigned to it?
View Replies
View Related
I have some ASP server-side code that works perfectly when the client is running on Windows (IE, Netscape, Firefox, etc.) but doesn't work at all when the client is running on Macintosh (IE, Omniweb, Safari, etc.) This is the client-side Javascript code:
View Replies
View Related
I have a series a forms that submit data to different tables in a database. As it stands, when a user completes FORM 1 and clicks the SUBMIT button, the FORM 1 data is submitted (action = form2.asp, method = post) to ASP code at the top of FORM 2 (request.form("form1 field name") etc...), and submitted to the database with SQL code, also at the top of FORM 2(INSERT into...). Hence the submit button on FORM 1 directs the user to FORM 2, and submits the data which is exaclty what I wanted. However, I now need the users to submit multiple sets of data with FORM 1, and direct them to FORM 2 once they have finished using FORM 1. Most importantly, I need to pass a few parameters from FORM 1 to FORM 2, and have these parameters submitted to the database.
My main problem is getting a fresh form1 after submiting the same form1, in preparation for anoter set of data using the same form. Basically, the database has 'one to many' relationship tables. Form1 and form2 are both populating the 'many' tables, so that each form needs to be filled-in several times while retaining the key field of the 'one' table. At the moment submiting form1 takes me to form2. Is is possible to submit the data to the database, get form1 back again to submit more data, as many times as required, then click another button to load form2 when the user is finished with form1?
Can anyone please give me some pointers? or at least explain the concept of what I need to do. I am a novice and it's taking me a while to get to this stage. Any help will be greatly appreciated.
Is it possible to post FORM1 to itself and insert the data (i.e. place the request.form at the top of FORM 1) If so, how do I direct users to FORM 2 while retaining my parameters?
View Replies
View Related
I am a new programmer seeking a right way for transferring data between forum to forum, as i am creating a site wich have a page keeping 20's of server controls like drop down list and text boxes the value of ddl2 changging on change of ddl1 and displaying its corresponding value in text box and i have 10 rows in this way and i wanna display all selected values of server controls in next page as report.
View Replies
View Related
I am trying to create a form where the user can check a box within a form and the address will fill in automatically from a previous address in the form, without submitting the form.
View Replies
View Related
I need to get some Request value from a Form... but this form is enctype="multipart/form-data" (to upload files) and I if I use the standard syntax Request("nameField") I don't get any value.
View Replies
View Related
I have a form which dynamically loads questions and answers depending on dept.
So the form input type has a value field of the actual answer text which is pulled from the database.
Sometimes the form can be 5 questions, sometimes more and sometimes less. So after the user submits the form, I gather the static input (ie. name, address, email, etc..) but
1. how do I loop to Request.Form for the dynamically generated answers if I dont know how many there may be?
2. How do I then take that data and use it in my Insert statement?
The questions with each answer will automatically generate the imput name field with the qid (question ID) which could be 1-?
View Replies
View Related
i have this page that inserts a form data into database... the problem is that it wouldn't let me insert my content into the database because of syntax problem... more specifically if i have an apostrophe.. it wouldn't let me insert due to the restriction of my code... is there a way to rewrite my code below so that i can insert apostrophe.. right now if there are ' in my content the strSql will screw up...
strSql = "INSERT INTO Events (Title, Author, Content, SDate) VALUES ('"&strTitle&"','"&strAuthor&"','"&strContent&"','"&strDate&"')"
View Replies
View Related
Does anyone know of anything or any issues that may cause HTML form box (shopping cart) to reset or not keep its posted value?
out of approx 2000 users, only 15 are having this issue and the common thing between them is using Mac's (Different browsers but mostly IE5 and Safari. even made one install latest firefox) instead of PCs.
Now I know this goes against everything I ever knew about SERVER SIDE SCRIPTING, but im really reaching for straws.
View Replies
View Related
I am developing a program now. This program has a front page for user to select a project. After the user hit "submit" bttion, he will go to another page which has a top menu.
User can see different part of project information by clicking there. I hope no matter in which order the user click on the items in the top menu, it will show the record based on this project until he select a different project. To realize this function, should I use cookies, or there are better ways to do that? It will be very helpful if someone can provide some sample code here.
View Replies
View Related
I have this code...
If Request.Form("Name") = "" Then
Response.Redirect "error.asp"
End if
If the browser does a GET against this page, sometimes the Response.Redirect doesn't happen. It is as if there is form data being sent on a GET. Has anyone seen this before?
View Replies
View Related
i am working my site using asp html vb javascript and css.
When a user registers on my site i would like them have their own page. I was wondering how would i be able to have a page made automaticaly after that person is registered? I am very new to javascript so....
This is the page after the user is done filling out the form: Code:
View Replies
View Related
I'm trying to retrieve the data off a form (survey.htm) and email the results
back to me using CDO and ASP (survey.asp). I'm confused as to how to
retrieve the form data from survey.htm and send it using survey.asp. Below is
a sample ASP script that I found on ASPFAQ.com and it works fine, but now how
do I grab the info from a form and incorporate it into the emal. Code:
View Replies
View Related
I need to select the data where the data ID is equal to the variable supplied in the submitted form. Below is the line of code I used for the radio select and the code to do the SQL search on it. I get the following error using this code:
Error Type:
Microsoft JET Database Engine (0x80040E10)
No value given for one or more required parameters.
/MyWeb/CheckIn.asp, line 93
The items are listed by ID 1-X.
<input type=""radio"" name=""CheckIn"" value=x.value>Check In<br>
Dim junk
junk=request.form("CheckIn")
'If Session("UserType") = "User" Or Session("UserType") = "Admin" Then
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("db1.mdb")
Set rs=Server.CreateObject("ADODB.recordset")
'in below, WHERE id = Request.Form("CheckIn")
SQL = "SELECT * FROM CompsIn WHERE ID = junk"
rs.OPEN SQL, Conn, 3, 3
rs.OPEN SQL, Conn, 3, 3 = Line 93
View Replies
View Related
I am using SQL 2000 database and MS Server 2003.
I am pulling in data from a sql table. For some reason, when I include
the following line:
<tr><td><b><%if rs("Street_dir")<> "" then response.write
rs("Street_dir") & " " end if%>
<%=rs("Street_num")%> <%=rs("Street_name")%> <%=rs("Street_suf
fix")%></b></td></tr>
then the following line does not display:
<tr><td><%=rs("remarks")%></td></tr>
The REMARKS data is blank. But, if I remove the upper address line, then
the REMARKS appears. The address is 1111 Main so that does not seem to
be the issue. The address information is VARCHAR fields, 255 characters.
This works fine on another server where my files used to be, but I just
moved to a new server.
View Replies
View Related
Is it possible if i wanna append xml data and upload picture at a same time using the same form?
The problem i'm facing now is, when i add the 'multipart/form-data', i can't append the xml data
I know there's one solution, using 2 FORM but the project i'm doing now is designed to be put them both (file type for upload and textarea for append) together
Besides, i have no idea how to encode or decode the posted data.
View Replies
View Related
This isn't actually causing a problem, but it's odd. I am getting additional data in the data posted by a form on a particular search script I have. I didn't even notice it (since it wasn't causing a problem) but I outputted the form data to screen just out of curiosity I found the following attached to the end of some data: §or=ANY
So for example, one part of the string might be:
&type=Brochure§or=ANY&publication=Evening%20Standard§or=ANY&etc.
It doesn't appear to be affecting anything, but I'm curious as to what that §or=ANY actually is.
View Replies
View Related
I have made a form for users to place an order. When they select the submit button, the user is taken to a form where the user must select to confirm or back to modify.
My problem happens when the user selects the back button (either on the tool bar or on the button provided in the form). I would like the form to remember what the user had just inputted when they go back but currently all entries are blank.
View Replies
View Related
1. A Form which is a drop down menu, posts selected value to the same page.
2. This page connects to a database and depending on the selection from the form. the results are displayed for that selection.
3. This page needs to refresh to pull updated data from the data base.
Heres the problem..
I have the form and page pulling the correct information and displaying it on the page, but when the page does a refresh the value selected from the form is lost and then no results will show.
View Replies
View Related
I am using enctype="multipart/form-data" in my form.
Everything has worked for past 2 years and I have not changed the code in the slightest. (1)
I pass some value to another page and this has worked for as long without any tweaks needed. (2)
Now (2) no longer picks up the values submitted by (1) for some unknown reason. If I take away the enctype, the data is passeed through but it's wasted as the form is to upload a file.
Would any change on the server or network be to blame? What do people suggest?
View Replies
View Related
The following will both post the form data using HTTP POST method to theserver2, and then open page2.asp, right? It is not posting form data to server1. The only difference is that #1 will just replace page1.asp with page2.asp. But in #2, it will open a new window for page2.asp, and page1.asp also there.
So that means post the form data and open a new page is not necessary
replace the existing page, case 2 is a good example. That's my confusions.
1. In page1.asp in server1, it has <form action="http://server2/page2.asp"
method="post">
2. In page1.asp in server1, it has <form action="http://server2/page2.asp"
method="post" target="_blank">
View Replies
View Related
Does anybody have the syntax to post form data to a CSV file? On submit, my form page will post to another asp page that will actually handle the data being dumped to a CSV file. I just can't seem to find the correct ASP syntax for this.
View Replies
View Related