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.

View Replies


ADVERTISEMENT

Multipart/form-data And Select

I have a form (which is multipart/form-data) it has a file field and a select. When i submit this form i can get the file but i can't get the value of the select? any ideas?

View Replies View Related

Form SELECT OPTION Displayed Data

Is there a way to retrieve the DESCRIPTION in the following code from within the process.asp page without adding additional fields to the form?

<form name="myForm" method="post" action="process.asp">
<select name="Options">
<option value="1">DESCRIPTION</option>
</select>
</form>

View Replies View Related

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 Replies View Related

Trying To Pass Form Data Gets Me: Syntax Error (missing Operator) In Query Expression

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.

<td valign=TOP width="168"><form action="HouseDetail.asp" method="post" name="MLS" id="MLS"><input name="MLS" type="hidden" value='<%=oRs("ML_Number")%>'><input name="Submit2" type="submit" value="Get Details"/></form></td>

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:

View Replies View Related

Sql Select Query

I want to select all the field form the database where name is not empty.

View Replies View Related

SELECT Query In ASP

I have created ASP file from MS Access. It has the following Code. But
it gives an error at:

rs.Open sql, conn, 3, 3

The Error is:

Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E10)
[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected
1.

/MyWeb/ERP-IR Distribution.asp, line 23

This error only comes when I write query that includes WHERE clause,
simple SELECT query runs without any error. Code:

View Replies View Related

Error With SQL SELECT Query

I am trying to run an SQL SELECT query, however, I am experiencing some problems with it.

It is coming up with the error; " Microsoft VBScript compilation error '800a0401'

Expected end of statement "

It is pointing to line 46 which is highlight in bold within my code below; is the error coming up because of the way I have formatted the query?

strSQL = "SELECT * FROM tbl_lunch WHERE (((tbl_lunch.Type)="general")) ORDER BY tbl_lunch.Type;"
Thanks for any help you may be able to give me on this

View Replies View Related

Apostrophe In SELECT Query

I'm trying to query a database where some records contain apostrophes in them. Is there an effective way to do this?

View Replies View Related

Problem With Select Query

i am getting the problem with Select Query..

i am storing date as

<form name="main" action="Addingdailyreport.asp"

method="post" onsubmit="return CheckForm(this);">

<input type="hidden" name="tdate" value="<%=date()%>">
</form>

and when i am going to display .... the Query is like this

sql = "select * from reports where username = '" & session("userid") & "' and tdate=" & date()

it's display nothing...

Date is storing in date base like ... dd/mm/year

View Replies View Related

Select Query Database Error

I have created a query and everytime I try to run it I get this error:

Microsoft JET Database Engine error '80004005'
Record is deleted.
/vsadmin/inc/incsearch.asp, line 162

This is the query: Code:

View Replies View Related

Query: Select All Registries From The Past 30 Days

I need to select through a query, every record with the date that is from the past 30 days from now. Any hint?

View Replies View Related

Select Query According To User Input For A WebPage In C#.Net With SQL Server 2000

How to select query according to User Input for a WebPage in C#.Net with SQL Server 2000.I am trying to build a web page in C#.NET with SQL Server 2000 using Visual Web Developer 2005. I want to select and execute the query according to user input.

I have a form which has 2 textboxes which gets start date and end date from the user. Based on start/end date my 1st query runs. Now if user does not enter any start/end date I want to run another query which takes default dates from database(which is in varchar:ex. now()/now()-180) according to logged on user's permisstions.

How to select query ?

View Replies View Related

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?

View Replies View Related

Pulling Select Data

Say I want to sort the data in both db's according to similiar properties and read the results in a table.

View Replies View Related

Select Multiple Data

Currently I have a combo box that shows records from a Select query using Group By. So it only shows each record type once. I can currently search for records using the combo box but I want to search for multiple records in the combo box.

For example, if in the combo box it shows records: Adam, Bob, Carl,,,etc.. Right now if I click on Adam, the search will bring up all of the Adams. What I want to be able to do is to be able to click on multiple records such as Adam and Carl and have all of the Adam and Carls show up.

View Replies View Related

Wrong Logic,select Data

I am using access with sch_time_start,end,start_time,end as text fields not as Date/time....I am getting wrong amount of record...Example:

If db has 6 records like start_time and end_time = 12:00 AM- 05:15 AM,
and person has sch_time_start and sch_time_end = 12:15 AM-05:12 AM.....I am missing smth...maybe logic is wrong.. Code:

View Replies View Related

Moving Data Between Select Boxes

I have used ASP code to load data into two select boxes. The code below is used to move the selected data back and forth between the boxes.

I am having problems retreving the data from the boxes after the user has moved any of the data:

If the data has been moved by the below code; when i try and load the data back into the database i cannot retrieve the data using:

request.form("Clients1").item(1) and it will not show up using
request.form("Clients1").count

If i dont move the data i can retrieve it using: Code:

View Replies View Related

Form Select

i have a form list box, which displays dynamicly. what i what to do is set the selected value where the O_R_ID = session("r_id") Code:

View Replies View Related

Request.Form Select Option

I am trying to retrieve option values using Request.Form as you do for textboxes! The textboxes work fine... but I can't get it done for select options.

View Replies View Related

Dynamic Select In Input Form

I have a form which inputs info into a database. However what I would like is to populate a select box directly from the dbase. When the form is entered the field is updated along with all the other info.

I have enclosed two of my pages - I think I'm nearly there.

View Replies View Related

Creating A Form With Multi Select

I am trying to create a form where you may have more than one person
at a meeting, but want to have them be related to the same meeting.

I have a mulitple select text area and if you select more than one,
all the records are being added to the same row. so if I picked the
following three people:

(Person ID/Desc)
1 - mickey mouse
2 - donald duck
3 - goofy

The row in the data base would look like this:

(Meeting ID/ Person ID)

1 - 1,2,3

But I would like to do this:
(Meeting ID/ Person ID)
1 - 1
1 - 2
1 - 3

I hope this makes sense, if it does does anyone have a suggest on how to best do this?

View Replies View Related

Form Select From Database Problem

I'm building a form select from a record set and then using the selected result to call another record set. This a maybe a dumb problem but it has me stumped. The first record always has a comma after it, theres no comma in the database and no comma in the code. Can someone tell where this comma is coming from? Code:

View Replies View Related

HTML Encode And Select Form Fields

I have downloaded and installed an ASP Calendar offered for free by Manohar Kamath from his website. I've modified it to accept two new fields (sStart_Time & sEnd_Time). I want to be able to have drop down selections for the time entry, but do not know how to accomplish this.

Please take a look and tell me if this can be done using the <% =Server.HTMLEncode(sStart_Time) %>"> value for this piece or if there is some other way to accomplish this, please let me know.

If I leave it as the following, it works OK, but I want to make it easier for people who are adding to the database: Code:

View Replies View Related

Request.Form Doesn't Return Form Data

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

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?

View Replies View Related

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?

View Replies View Related

Sql Query Not Returning Correct Data

im trying to display a name from a table, by matching up where an assigned_to id = emp_id in another table. Code:

View Replies View Related

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?

View Replies View Related

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?

View Replies View Related

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:

View Replies View Related

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")

View Replies View Related

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.)

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved