SQL Query On Form Data
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 Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
SELECT Data Form A Query
i try to get data form access with asp. The select contains 2 Subselects. If i set this SQl statement in Access it works. But if i set this in ASP it doesn't. Why??? There is no error. It's completly the same statement.
Passing Form Data Using ENCTYPE="multipart/form-data"
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?
ASP SQL Query Error With Data Types
I am trying to use a query to filter SQL Server 2000 records by a date value. Here is relevant columns in my database table (tblContent): title [nvarchar] starting [smalldatetime] .... and here is my query: Query = "SELECT title FROM tblContent WHERE starting = '" & date & "'" I've done exactly this query on numberous occassions in the past with no problems at all but this time I get the following error: Microsoft OLE DB Provider for ODBC Drivers (0x80040E07) [Microsoft][ODBC SQL Server Driver][SQL Server]The conversion of char data type to smalldatetime data type resulted in an out-of-range smalldatetime value. What on earth is going on? I'm not using a char data type anywhere! I am doing all the initial development locally and I have just installed XP Service Pack 2. I realise it's unlikely, but that's the only thing I can possibly attribute it to. Or am I just missing something obvious?
How To Retrieve The Data From Last Record Of The Query?
I have 2 tables Table_A and Table_B are linked together by TaID Table_A TaID - autonumber Name Address Table_B TbID - autonumber TaID Comments here is my asp page ------------------------- <%@ Language="VBScript" %> <!-- #include file="connectionstring.asp" --> <% 'declare variables DIM ...... 'Assign Variables ....... Set Conn = Server.CreateObject("ADODB.Connection") 'database connection Conn.provider = provider Conn.ConnectionString = dbasepath Conn.Open 'Sql statement to insert the data sql = "insert into Table_A ( Name, Address) values (...*data from form*...) ' execute it Conn.Execute(sql) Response.Write "Data successfully inserted!" Conn.Close Set Conn = Nothing -------------------------------------------- my question is I also need to insert the data to Table_B, but before that, I want to retrieve the Table_A.TaID first. so if i do "select TaID from Table_A" and execute the sql how do I assign just the LAST record of TaID and assign to temp variable? Do I allow to do that? if so, where should I put in the code above?
Retrieving Data From Database - Query String?
I have this page with photo thumbnails that are clickable. Each photo has corresponding info saved on a database. When the thumbnail is click, im trying to show the data in an asp page called info.asp. sample: Photo #1 when clicked goes to: info.asp?no=1 Photo #2 when clicked goes to: info.asp?no=2 so on so forth.. the database fields are: no picname date details I only know how to display ALL info from a database. But i cant figure out how to display SPECIFIC info triggered by a query string. Example. Photo #1 is clicked. I only want the data that corresponds to Photo 1 to be displayed. How can i do this?
Submit Form Data And Refresh Form
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?
Dynamic Form With SQL Query
I have 2 databases, one i write two when i submit the form, that works fine. The other holds contact info. I need for when the Company Initials are typed in(form CSN) that the Pace Administrator info fills automatically(PAName and PAPhone). Code:
Form Results In Query
How can I get this line to work? I am trying to get the results entered in a form to be part of my query. I am able to get the form results but I get a error stating Syntax error (missing operator) in query expression 'Assignee = Tom Jones'.Below is the line where the error occurs Session("dbWhere") = "Assignee = " & Request.Form("assignsearch")
Form Vaiables In A SQL Query
I am trying to use form input (like text from a texbox) in a SQL query. So that way a person can enter a value in a textbox and hit a button to check for that value in a database. I have the connection to the database working fine its just passing that form value into the SQL string. I wish the SQL query would work like this: SQLCommand = "SELECT * FROM dahliaSchedule WHERE scheduleDate= " & txtDateValue where scheduleDate = (a value from the textbox from the form.)
How To Display Images In Tabular Form From Db Query
just manged to get an image retireval search engine working. The ASP script works fine, my query results are filepaths of images. i structured a query in within asp to obtain images which have similar textual values. It is more of a cosmetic issue. when i get my query results back, my script prints or displays the images from top to bottom. which means i have to scroll vertically up and down the asp page over 10-30 images. Code:
Form To Form Data Transfer
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.
Passing Form Data Within A Form
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.
Request In Form Enctype="multipart/form-data"
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.
Form Data
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-?
Form Data
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&"')"
FORM DATA
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.
Keep The Form Data
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.
GET And Form Data
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?
Send Form Data Using CDO
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:
Some Data Not Showing In A Form
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.
Multipart/form-data Vs Xml
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.
Post Form Data
Is it possible to post form data and open an invisible window? For example, in page1.as <form action="page2.asp" method="POST" It will post the form data from page1.asp to the server, and open page2.asp. But I dont want to make page2.asp invisible.
Odd 'extra' Form Data
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.
Remember Data From A Form
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.
Form Data Being Lost
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.
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.
Form Data Not Passing
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?
Submit Form Data
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">
Post Form Data
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.
Clearing Form Data
was there anyway to clear the data submitted by a form? What i need to do is once the page refreshes, clear the sent data?
Retrieving Form Data (part 2)
Is there a way in asp to retrieve part of the URL and use it say the url was http://localhost/site/craig/default.asp or http://localhost/site/craig/test.asp or http://localhost/site/craig/roger.asp?dan=1 is there anyway of retrieving the word craig so to use it in the page, I just want the word Craig This is because i could have other addresses that are for example http://localhost/site/jon/default.asp or http://localhost/site/jon/test.asp or http://localhost/site/jon/roger.asp where i need to retrieve the word jon at the moment i use the code strURL = Replace(Request.ServerVariables("URL"), "/default.asp", "") intStart = instrRev(strURL, "/") + 1 strName = mid(strURL, intStart) this worked fine until new pages are added ie a page that isnt default.asp Obviously i cant use strURL = Replace(Request.ServerVariables("URL"), "/default.asp", "") because default.asp will change...
Data Not Delivered From Form Using ASPmailer......
I created a form that collects information from a user via a web page. The form appears to work well - it won't let you submit the form until required data is place in the required fields. I receive the email from the form via the ISP but the data collected from the form is not there. Where did it go? Here is a copy of the code I am using - It's standard. <!--- mailer.asp ---> <% Set Mailer = Server.CreateObject("SMTPsvg.Mailer") Mailer.FromName = Request.Form("mailer") Mailer.FromAddress= "mailer@net.com" Mailer.RemoteHost = "000.000.00.11" Mailer.AddRecipient "mailer","mailer@net.com" Mailer.Subject = "Customer Request from web site" strMsgHeader = "Form information follows:" & vbCrLf for i=1 to Request.Form.Count strMsgInfo=strMsgInfo & Request.Form.Key(i) & "- " & Request.Form.Item(i) & vbCrLf next strMsgFooter = vbCrLf & "End of information" Mailer.BodyText = strMsgHeader & strMsgInfo & strMsgFooter if Mailer.SendMail then %> <% Response.Write "Mail sent..." %> <% Response.redirect "thankyou.htm" %> <% else %> <% Response.Write "Mail send failure. Error was " & Mailer.Response end if %> I know that this code works on another site I have created NOT using CSS. This is the first site that I am creating a site using CSS.
Form Data Not Going Into Text File
I currently am trying to get a form to send its data to a text file. I use the code I have found in tutorial/help sites around the web, but when I try the code out, nothing happens. When I click the "Submit" button on my form, I am sent to the .asp file and the code in that file is displayed in the browser. There is nothing written to the text file either. The code I have in my test.asp file is:
How Do You Post Form Data To Another Page?
Here is the situation: 1. User fills in form and hits submit 2. Some processing is done with the posted data using ASP 3. The posted form variables now need to be submitted to another script which only receives POSTed data. How do I send the posted data to another script? I can't run step 2 on the next script as its validation script and I'm going across two servers.
Form Post Not Passing Data To ASP???
I have IIS server installed on XP-pro. I also have Norton Internet Security installed. I can run simple ASP programs without any problem. But when I use forms with post method and call an asp in action, it does not pass any data to ASP. Request.Form method on a form field does not return any value. This code works on web hosting provider server, just does not work on my workstation with my own IIS server. Code:
Simple Way To Email Form Data
i am creating a survey type page in Visual Studio it has 2 textboxes and 2 dropdowns and a submit button. all i need it to do is when i click the submit send this data to an email address. The email address will never change so...
Get Data From A Form With Different Field Names
I am designing a shopping site, in the picture the #1 section is a check box behind product name that customer can select that product to buy in #2 section the customer can set quantity of the selected product ok now codes this is the code which I have used to pull out produts and categoris from database and show them on the page Code:
Sending Data From A Form To A Vbscript
I've been asked to take data from a form and then send it to a vbscript. The client has made a vbscript that performs a calculation (i haven't been told a great deal about it yet) and now they wish to put it online, so that when a user enters data into a form, it sends the data to the relevant fields in the vbscript. I don't know a great deal about Visual Basic, so if anyone could explain how i might be able to go about this ..
Web Form Which Send Data In XML Format
I've written many pages that emails the content of a web form, but the data formatted very nicely. Is there a way to have the content of the submitted form data via email in XML?
Question On Data Post Via A Form
I've got a question regarding data retrieved via Post. If i have a standard textfield within my form: <input type="text" name="number" size="10"> and i submit the form with the textfield left blank, when i use: Request.Form("number") what data type will it return? I need to know the data type so i can check for "", null, nothing or something else. Assume these scenarios: 1. The user is supposed to type in a number in the textfield 2. The user has no restrictions on what he can type in the textfield
Automatically Iterate Through Form Data
Is there any way to access form data in an automatic sense? For some reason, I thought you could access form elements by request.form(0) and it would give you the first form element, but that doesn't work. My problem is that I have a dynamically generated from (to the point where fields change depending on DB data) and I need to access both the name of the form object, and the data in the object dynamically. I thought there was a way to do this, but w3schools.com doesn't have anything like that listed for the request or request.form object.
Form Data -> External Gateway ->
I've got a form with some user-submitted data in it. I need to post this data to an external gateway script running on an entirely different domain (via HTTPS). I then need to get a response back from that page and display the results on the original page to the user.I'm guessing that this is identical to what is done with merchant gateways for e-commerce, but I need to do this without any components.
Adding Reg Form Data To MS Access DB
I am trying to test a form at home which is for registration purposes. I dont have a server connection yet. Im wondering if it is possible to check whether the form is working offline or whether my code just isnt working! ? I should also say that my html files, asp files and database are in the same folder. Code:
Problem With ASP Multipart/form-data
I am using VB 6 and ASP to upload files to the web server in one of my web applications. The architecture is something like this...Thin ASP/html front end using multipart/form-data when user selects the file and clicks on upload a COM object is being called to upload file. This works absolutely fine when dealing with file sizes in b/w 1 to 15mb....Now users are trying to upload huge file sizes such as 80mb/100mb. the web application dies without uploading the file....hence was interested to know if there is any size restriction for this??? The COM object is written using ASP Scripting library, MTS scripting engine, ASPSOFT upload....references.
Problem Posting Data From Asp Form
I am running IIS5, Win2k Server, and .Net Framework 1.1. For some reason asp forms will not post data. So I have a form with a text box. The form's method is set to post and I have a submit button. The weird thing is that the page works fine without using SSL and/or the FQDN for the server. Code:
Sending Form Data Between ASP And ASPX
Im doing an asp.net-application where we have an external asp-form in a iframe on the mainpage. On submit, the form sends its data through method="get" to a page with a frameset (i couldnt get the data through POST). In the framsetpage, the data is receieved in the frameset and then sent to the lower frame through querystrings. The lower frame is also an external asp-page. My problem is this, the .NET-platform is using utf-8 and some other way of URL-decode things then the old platform did. So for example the swedish letter 'Ö' is in .NET URLdecode '%c3%96' and in the old asp-way '%D6'. The asp-page has no idea what '%c3%96' means so the formdata is a bit corrupted on arrival. What i was wondering is if there are any ways of convert the new way of urldecode strings to the old way? Preferably in C# since thats the site's main programming language.
Submit Form Data Concept
When people say submit the form data, does it mean the form data are submitted to web browser using either HTTP GET or POST method, and then it will redirect to another page. For example, this is page1.aspx <form action="page2.aspx" method="post"> means it will submit the page1.aspx form data to the web server, and then redirect from page1.aspxto page2.aspx?
Form-data" With JScript
So I've set my form to "multipart..." and then I'm doing the "Request.BinaryRead" But... JScript doesn't seem to provide a binary data type. And the string type can't be trusted because its char based, which could be any number of bytes per char. a way to access binary data in JScript? Or is it a non-started. Keep in mind that we have a massive project in JScript hence the reason to keep it in JScript if possible.Assuming that there is no way to do it in JScript then I'll have to use a VBScript block inside my JScript code, in which case what are the implications of sharing variables between the 2 blocks?
|