I 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?
a source code regarding a search code like what the big G and Y did on their search box? say searching two keyword separating with a comma? using this doesn't help much
Quote: "SELECTfield_1, field_2 FROM table where field_1='" & keyword & "'" & " order by field_2"
I am developping a web-based file browser. Everything so far so good right now.
To make the userinterface more conveniant, I want to split my file list in pages. with
Set oFSO = CreateObject("Scripting.FileSystemObject") Set oFolder = oFSO.GetFolder(CurrentPATH) Set oFolderContents = oFolder.Files For Each oFileItem in oFolder.Files (...) Next
I get a list of all my files in oFolderContents. Is there a easy way to
-split the whole list up in pages of i.e. 20 files -show general info (i.e. xxx files in folder, listing 20 files on page y/z) -let the user have the possibility to call the page with index i, where i stands for the i-th file on the list
I was wondering is there is a way to neaten up or rather seperate the main layout and the asp codes? For example, to have a main.asp(which is solely the design and layout) and include other .asp files that retrives and records the records.
i have a search form that will only search the whole string when searching a query. i would like to have the search string split into separate words so that each word could be used as part of a single query. is there a simple solution to my question ?
i need to convert some existing templates into ASP, and have come across a stumbling block (which is probably only due to my complete lack of knowledge of all things ASP related ):
is it possible to include files held on a completely separate domain ? the standards include statement only seems to have file and virtual capabilities, and nothing comparable to php's capability of doing something like Code:
How can I correct an address if the user forgets a space between the number and street name? For example, "1600Main Street" would be corrected to "1600 Main Street".
Is there a way to go step by step from the left and enter a space if I hit a letter or stop if I hit a space?
I have a table with a number of 'advertisements', and each ad specifies a page display location (#1 - #9). I would like to query for all ads, but display them only where they have their location (see image above). I currently have 9 different SQL queries, one for each location:
"SELECT * FROM tb_ads WHERE f_adlocation = 1
I would like to have one query, and at location 1, simply say: "If f_adlocation = 1, then display here. If there is more than one, then repeat as necessary". Here is what my database looks like: I have attached sample data as a .txt file.
I have two sites on my computer. I am using a same page in the two sites. I set my IE to Korean (testing purpose) encoding for testing internationalization.
When I hit the same page in two separate sites, one shows the foreign characters in Korean, but the other shows garbage-looking characters.
if there's a better way to seperate my asp code from the main layout? like to have an index.asp(solely the layout and design) and just include other .asp files to display the records.
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)
Say 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?
<% 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.
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?
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?
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.
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?
I 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?
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.