Select Queries With Just A Text Link
I have 2 queries on one asp page, usually I only run query 1 as default, But I hope there is a text link called "Run query 2" and when I click it, my asp file will run query 2.
View RepliesI have 2 queries on one asp page, usually I only run query 1 as default, But I hope there is a text link called "Run query 2" and when I click it, my asp file will run query 2.
View Repliesi have a text file (tsv) with products in, but i want to run queries on certain fields, e.g. description, i ahve tried linking the txt file to a databse but the recordset does not work,
does anybody have a sample script that will query a tsv, csv file.. e.g.
SELECT FROM prices.tsv
WHERE products = cisco
I have a site runing with various different sessions. I want to set a link so users can end one of the sessions but not all sessions.Ive tried
Session("session1").Abandon()
Session.Contents.Remove("session1")()
and didnt work.is this possible?
i am linking the text to a new fresh page by a popup. however, when i take away the <a></a> tag, when i move myu mouse over, it does not have the effect. but when i set the href to --> href="#", it pop out 2 windows. How can i solved the prob? I just need to link the text to a new fresh pop out when on click.
function popup(url)
{
newwindow=window.open(url,'name','resizable=yes,sc rollbars=yes');
if (window.focus) {newwindow.focus()}
return false;
}
<a href="#" onClick="popup('search_coyfrm.asp')">Search Company</a>
can i get an example of how to read values from a text file that will be used as links on my page. i'll have a .cvs file ala:
LINK ASP_PAGE
"click me1", "clickme1.asp"
"click me2", "clickme2.asp"
"click me3", "clickme3.asp"
i think i can figure out how to do the read, but need to know how to get it on the page where i need it.
I have a text box in frame one that the user will enter a 4 to 8 digit number and tab over to text box two to enter a qty they want to order.
BUT after they tab out of the first text box I want to display in the second frame the results of that number from the first text box - weather its valid with discription or invalid number.
1. I have created a database with the inventory #'s with discription.
Current link will display number and product code /framequickpadinfo.asp?pass=0401
/framequickpadinfo.asp?pass=4160017
and so on. That part works fine.
I just need to know how to link that text box in frame 1 over to page (framequickpadinfo.asp) in frame two..
I have copied the code below from elsewhere on the web in order to create a form that will allow users to upload pictures to my server.
First obstacle i'm encountering is that the 'upload' button doesn't appear as a link but rather as text. I'm VERY new to .asp so hopefully somebody will see a minor error and explain how to fix it. Code:
I have an .asp page containing a form with (multiple) select/dropdown boxes. The page is submitted to itself.
Is there any way of retrieving the selected values (i.e. the text) in the select boxes server-side?
I'm looking for something like Request.Form("Select1").Value.
Normally I use Access database with ASP, and I create queries using the wizard which Access has. Then, I copy and paste the code in the ASP page and create my SQL.
I was wondering if it is easier to call the query directly with its name from Access, or else continue using the old procedure.
I'm trying to build sql queries that will search through my DB. I am currently seperating my queries through multiple indexes in an array depending on whether or not the strings are wrapped in quotations.
I also want
Fluffy
Teddy
Bear
(three different LIKE statements)
I have the following page which I am using to select 3 diffrent queries but i was wondering if i could just use one SQL statement instead of 3? Code:
View Replies View RelatedSay I have 5 fields in a form. I have figured out how to query a database using all 5 fields and display the records that match at least one of the fields.
I'm trying to figure out a way to, if say the user only fills in two fields, to only search the database for matching records based on just the two fields. As I have it now, the database is searched for the two fields they entered as well as three fields of "", which I would rather not have. Is this possible?
I have a DB. With 1 table called "products" and 3 product records. The 2 fields present in the table are called product_name and product_price. The names of the products are Product1, Product2 and Product3. They cost 13, 8 and 24. Which code (SQL and AP) would generate an output similar to this?
Total is: 45.
Product1 costs 13
Product2 costs 8
Product3 costs 24.
<%
SQL = "Select * FROM products" (plus some kind of sum function to calculate the total (to be able to display the sum before the various products) of the recordset without having to loop through the recordset first)
%>
I need to connect to 2 different databases in ASP and execute two different queries. Please let me know how to proceed. I understand that ADODB.Command option can connect to only one database at a time.
View Replies View RelatedI am running the following code to an access database
' Recordset Object
Dim rs
' connecting to database
con.Open connStr
' executing stored procedure
Set rs = con.Execute ("exec SpotDesc")
' showing all records
While Not rs.EOF
Response.Write rs(0) & " " & rs(1) & "<br>"
rs.MoveNext
Wend
' closing connection and freeing resources
con.Close
Set rs = Nothing
This works and runs the stored procedure SpotDesc.
One question I have is that this line brings back the results
Response.Write rs(0) & " " & rs(1) & "<br>"
but requires me to know how many colums are being returned, ie rs(0) is column 1 and rs(1) is column 2
Is there a way of writing this line and it places all the columns there wheter it be 1, 2, or 3?
Ie a way of know how many columns are returned...
Is there also a way to show the column heading?
I never ever thought about this, but recently I made a query in access so I
can make a customer mailing list based on relational information and it was
so easy to make the query and join tables and assign criterea using access.
And I haven't tried or thought about this cause in my own small asp projects
I've never used a dbase with queries in it, but after seeing how easy it
was, it would save a lot of time from manually writting queries in asp.
So, what I'm asking is if I can use a query from an mdb in asp just like I
can access tables?
This "query2" is used in an MS Access environment.
SELECT T_Perso.*, query1.*
FROM T_Perso LEFT JOIN query1 ON T_Perso.IdPerso = query1.IdPerso;
In SQL, "query1" is :
SELECT T_Items.*, T_Items.IdTypeItem
FROM T_Items
WHERE (((T_Items.IdTypeItem)="Inscription"));
I would like to translate "query2" in full SQL language in order to use it
in ASP but I have some problems with syntax and sub-queries.
I suppose it's quite easy but.I'm a newbie in SQL.
Can I have one recordset execute a Select and then have another recordset execute a different Select, and then check if a field from the first recordset is different from the field in the 2nd recordset and if so write out that row on my displaying table?
View Replies View RelatedI want to define search based on diffrent conditions.The user has the option to select any number of choices.i.e
Condition1.Age
Condituon2.Age & marks
Cindition3.Marks
How do I construct dynamis sql query?
I am using ASP and crystal reports 8.5. I am able to show report from asp. My problem is , I have to show the report based on the sql query that is passed to crystal report from asp. I actually dont know how to pass a query into crystal reports from asp.
View Replies View RelatedI have a single asp page (index.asp) with an include file (include.asp). I would like to query the database with index.asp as well as query it with include.asp.
I searched online, in my "SAMS Teach yourself active server pages 3.0 in 21 days" and it makes no mention of two queries on a single page. Is this even possible?
Is it possible to use an If statement to select a single query from a list of queries from an access db? Something like this:
If Request.Form("Womens") = "Pants" Then
'open the db and run the query called pants
ElseIf Request.Form("Womens") = "Shirts" Then
'open the db and run the query called shirts
'on and on we go, etc.
End if
My gender categories (women, men, etc.) have multiple sub categories (shirts, shoes, skirts, etc.). Does is make sense to use an if statement(assuming it can be done) in this manner? It seems it would make life easier to use one script to perform many tasks, as opposed to one script that does just one task.
the following statement doesn't work, even thoug when I execute SQL_1 and SQL_2 separetlly it works fine.
SQL_1 = "SELECT COUNT(*) AS ACTIVE_LINKS FROM TABLE_LINK WHERE ACTIVE = 1"
SQL_2 = "SELECT COUNT(*) AS UN_LINKS FROM TABLE_LINK WHERE ACTIVE = 0"
SQL = SQL_1 & " UNION " & SQL_2 ...
I know that asp can be used to fire off stored procedures within databases, but I was wondering - does a 'query' in Access mean the same thing as stored procedure? If it does, how could I get asp to fire off that procedure when needed?
View Replies View RelatedI need to take two seperate queries and put them in a single html table, but i want to combine the sets of data 'while selecting them' so i can use the SQL sort by command to arrange the whole table by date..
sorting the two queries independantly then dumping them to the table results in both queries being sorted independantly, ie the most recent entry(by date) of the second set of data ends up in th emiddle of the table.. any ideas?
as with searching through a mdb table, is it possible to search a query in access?something like...
select * from 'access query' where
Is there a way of inserting the query of records from the first database into the second? Because I want to use the second db by deleting records that might be unnecessary.
View Replies View Relatedbasically, I have the files for this thing, it basically retrieves and displays records from SQL on screen. cool.
Now I want to add further additional fields in that asp file, so ive added labels and textboxes. cool.
How do I tell it to go to the SQL DB and retrieve the data?
Once its done that, how do i take each field that is required and place them in the correct textboxes?
I have a form which accepts the username and password. I am storing it in an Access Database. How do I check if the user already exists in the database by passing SQL queries? Could someone possibly give me the code or maybe a link.
View Replies View Relatedgive me a sample code to display a "please wait"
message while retrieving results from the database in ASP.
I have a form submitting a date range in ASP. I want to use them in a query to select from access.I've done similar things with other languages and/or other DBs.
StartOfMonth = Request.QueryString("StartOfMonth")
StartOfNextMonth = dateAdd("m",1,StartOfMonth)
EndOfMonth = dateAdd("d",-1,StartOfNextMonth)
StartOfMonth = CDATE(StartOfMonth)
EndOfMonth = CDATE(EndOfMonth)
sqltext = "SELECT * FROM NewsLetterRequests WHERE CDATE(DateTime) >= " & StartOfMonth & " AND CDATE(DateTime) <= " & EndOfMonth
I currently have a sql query that pulls all records based on a variable(var1) inputed by a user from a form. Each record in my database has a time stamp assoicated with it. I want to give the user the option of pulling all records based on (var1) and allow them to sort based on date or time stamp also with a two fields that will take a range.
(ex. Beginning date and Ending date). So my default sql query will allow for var1 to be inserted and to have all records returned for the current day. BUT, IF A USER HAS ENTERED
A DATE RANGE then all records will be returned for that date range based on the var1's value. How could i go about about structuring my code for this? I was thinking about a "Switch" statement that could response to different user options with different sql queries. What do you guys think?
i have been doing this asp page....but the page doesnt seem to work....it doesnt redirect as i wanted it to be...i dont get any erro message....so idont know wats wrong witht his code:
View Replies View Related