Use Value In Query String To Produce Multiple Record Sets
I have taken over a website that was done in Frontpage and I am trying to move away from it. I am having problems with page 1 where I have a link that passes a single value to page 2 in the query string.
On page 2 I want to use that value in the query string to produce mulitple record sets. This actually works when using the fpblib.inc. Is there a way of doing this without having to use Frontpage coding.
View Replies
ADVERTISEMENT
Is there a way for me to determing if a column exists in the table? ex. I
have RS("var"), where RS is a recordset. My code is dynamic but some tables
will have "var" while some won't.
View Replies
View Related
Is it possible to have an ASP form where there are 2 form fields, each mapped to a separate Access Table? Say for example
Dim rsOne
Dim rsTwo
rsOne mapped to tblOne in Access File Mydb.mdb
rsTwo mapped to tblTwo in Access File Mydb.mdb
View Replies
View Related
how can i compare 2 record sets. In one RS i have excel file and other RS i have SQL server and when i get the results from both i want to compare them as one of you guys suggested me to write a loop that cycles through the record sets Comparing any fields.
View Replies
View Related
What would be the most efficient way to check to see if a cookie matches a record in a DB table?
If the user's cookie matches a record in a table of executives, then I want to display a breadcrumb menu item just for that executive.
This does not have to be super-secure or anything, I just want to keep honest people honest.
If the information they submit in a cookie is also present in a table of executives, then I want them to see a comprehensive menu set. If they are not in the table, then I want them to see a reduced menu set.
How to go about comparing a cookie with multiple values or keys with a record in a table?
View Replies
View Related
im a passing 3 fields from a form to use a search criteria against an access database table, i have set the fields a numeric values, what should i use to allow all records to be shown for a invidual value rather than a selected value.
Ie the form would pass
Location_id as 22
so the result page would see Request.form("Location_id")
sql would then see
where location_id = var1
var = 22
but i want to get the sql to say
where location_id >=0
what do i need to do
View Replies
View Related
Before I created this thread, I've searched Google and used the search feature of this forum numerous times on how to do this, but couldn't find much.
Basically, I'm trying to pass multiple sets of values from the search form to the ASP into an SQL statement (Access Database).
I can only make it display different prices of a certain music type, eg all prices of rock. But it doesn't output all types of music for certain prices, eg viewing Classic and Rock records with prices of 8.99 and 10.99 only.
I've used the REPLACE command I've found and got around that problem of syntax with numeric/alpha data. Code:
View Replies
View Related
I am fimliar with asp javascript and not asp VB.
i can display the results ok, but if i return 100 records from my table i would like it to display 5 records per page. i have looked at asp recordset paging on several sites, however cannot find any scripts that work with ASP JAVASCRIPT....
View Replies
View Related
1 -- We are building a website where people fill out online forms in order to create legal documents.
2 -- The forms are submitted to the server.
3 -- At the server, the information entered into the forms, such as the person's name, etc, is inserted into the legal document templates. The completed documents are then checked by an administrator.
4 -- After the documents are checked, the adminstrator submits the completed documents back to the front end of the website where the customer prints it out.
5 -- However, we want to send the final document as a PDF.
So the question is, can someone suggest the best way to convert our completed documents to PDF? My programmer and I realize we'll probably have to install some program to do this onto the server. We're just not sure what will work best. Also, we are using MS SQL. All suggestions welcome.
View Replies
View Related
I am using ASP/MS ACCESS to see how I can query the same database, via 2 formfields.
{name: - search}Textfield 1: - Search by Category
AND/OR By
{name: - searchT}Textfield 2: - Location
Currently,
strSearchwords = Trim(Request.QueryString("search")); where "search" is the name of Textfield1
Which is fine, but how can I set it so that on Submit, the string from search, and searchT are somehow joined together into one string?
View Replies
View Related
I'm trying to do a simple record count from my Access table but when it runs I keep getting a result of -1 when it should be over 50.
<%
set rsKaCon = Server.CreateObject("ADODB.Recordset")
rsKaCon.ActiveConnection = MM_jsb_stk_STRING
rsKaCon.Source = "SELECT * FROM USDSTOCK WHERE Modelcd = 'Fiesta' "
rsKaCon.Open()
rsKaCon_total = rsKaCon.RecordCount
%>
And the result should be Code:
View Replies
View Related
i want to insert some records to Access Database using the checkbox.i've try all the example i've found but it does't work.it's like checking our yahoomail.but i want all the tick checkbox insert to database
View Replies
View Related
I have written an events diary for a client .. and they wish to have a system of multiple deletes so they simply use a check box to select the items to delete and then hit a button to remove the selected records form the database. as all iget is scripting errors. Is there a simple way to do this?
Someone advised me to use an IN statement to Delete multiple records, but all I get is :
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression 'ID In ()'.
I have followed several different tutorials but I get the same outcome! It doesn't seem to like the IN statement.... any ideas anyone ???
View Replies
View Related
currently working on an app that lets users register their career history details with us.The form that captures data has 7 fields which are repeated four times. i.e. the user can enter up to four past employers, four job titles etc. Currently there are four instances of each field which all share the same name (four fields named Employer, four fields named Jobtitle etc...).
I'm guessing the best way to write all the info back to the Database is to split the form data into an array and then use a Looping or For i = 0 to whatever..... type structure but i can't figure out how it should be done or if this is even the right way to do it.
View Replies
View Related
I am trying to insert multiple records into Access DB from a form. Code:
View Replies
View Related
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
In my Access database I have multiple images for some of the records. What is the best way to retrieve and display the multiple images. I am storing the images in a folder and only the path in the DB. Some of them have just 1 image, some 2, some 3 and so on. I have the record ID # and the image name same, for eg. if the record id is R01 then the image name would be R01.jpg if there is only 1 image otherwise R01a.jpg, R01b.jpg, R01c.jpg etc. Is there any way I can open the folder and check for the name and list the image file names as a link to display the images if the ID name and image name matches.
View Replies
View Related
We have a facility on our intranet where users can log problems, comments &
suggestions about the site to a DB.
I'm building a page that lists the outstanding entries, and allows use to
mark any number of entries as being 'done'
That is, we have a number of rows, with the last field in each row being a
checkbox to indicate the entry has been dealt with. At the end, there is an
Update button which submits the form.
The question is.. how to handle this...?
The best solution I have thought of so far is to use the record ID as the ID
for each checkbox. Then to Split() the resulting Request.Form into an array,
loop through the array picking out the record IDs.
It's not a bad solution, but I figured this must be a fairly common
procedure and that somebody might have a slicker way of doing it...
View Replies
View Related
I have created a database request page (wahooo - new to asp and it works)
and everything is great. Now I'm creating a second page and want to know if
I'm able to make two different queries on one page. I want to be able to
create one query that uses a Request.QueryString from a URL and then use one
of the returned values from that query to create another query on the same
page. I hope that make sense. Here is the database connection code:
View Replies
View Related
What I have is multiple tables that I want to pull information from and display it on a html page. I want to select a name from a dropdown menu and then it will display the persons results. There are no foreign keys and I don't have access to modify the database so hopefully I can work out a way without needing to.
So I have a various tables say for example Monday, Tuesday, Wednesday etc then they all have fields for example Monday will have mon1, mon2, monUsername and Tuesday will have tue1, tue2, tueUsername. (hope that makes sense!) The MonUsername and TueUsername will always have the same name. Code:
View Replies
View Related
I'm trying to get results from a number of areas via one command string.for example ?location=devon retrieves everything in devon but I've only got a link for the whole south west so I need to send ?location=devon or cornwall or dorset etc. altogether.Is there a way I can do this without changing the asp page or do I have to only search one field at a time.
View Replies
View Related
Here is the SQL Query string that gives me an error.
mySQL = "SELECT * From tblSuperQ Where (DCR Between '"&DCRF&"' And '"&DCRT&"') And Where (Inductance Between '"&indf&"' And '"&indt&"')"
Can you not combine Wheres together?..
If I use UNION ALL between the two where queries, it returns all the results between DCRF and DCRT, AND all the results between indf and indt. I want it to query only those that have values only in both where queries.
View Replies
View Related
This is a pretty basic question which I've been unable to find an answer for from searching Google - I'm trying to query my msql database to return all news stories where the field "smonth" is equal to January, and "syear" is equal to 2004.
<%Response.write "<a href='news_detail_monthstest.asp?smonth=January&syear=2004'>"%>
and on my news detail page, the query is:
SQL_query = "SELECT * FROM tblpages WHERE smonth=" & Request.QueryString("smonth") & "& syear=" & Request.QueryString("syear") & ""
This returns the error:
Unknown column 'January' in 'where clause'
so it's seeing the value I want to pass and assuming it's the column name, instead of the column name "smonth". The fields in the d/b all exist and are named correctly.
I've obviously made a mistake in my select statement or my query string but I'm not sure what.
View Replies
View Related
I have small problem with query string on Internet explorer 7 since I updated and I saw that problem with other browsers before. My code to search is :
<input name="client_id" type="text" class="style34" id="client_id2" style="background-color: #DCFCE1;padding: 3px;border-left: #A0A0A0 1px solid;border-bottom: #A0A0A0 1px solid;border-right: #A0A0A0 1px solid;" size="30">
</span><span class="style47">
<INPUT name="fillButton" type=image class=noneInput onClick="javascript:location.href('contacts.asp?cid='+clien t_id.value);" value=submit src="images/but_search.gif" align="bottom" width=22 height=21>
But I cant push the button it does not work, what's wrong with it ??
View Replies
View Related
I'm getting a QueryString on a page. From this query string, I need to query a database, get a bunch of file names, attach them to an e-mail and fire it out (no problem). The problem is, I want it to happen when a user clicks a button.
I've been using .NET for so long (this isn't a problem at all in .NET obviously)...that I've forgotten how to handle this. Am I going to need a second page to post an array of the file names to and then handle it there? It just seems awfully redundant to need a second page to handle all of this, but I guess it wouldn't shock me.
View Replies
View Related
I know how to use [field LIKE '%keyword%'] to pull up all records that contains the keyword, but what about not containing the keyword? I've tried NOT LIKE but i get
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
View Replies
View Related
I have heard about a piece of software that can be installed on your server convert unfriendly search engine ASP query strings to friendly strings that search engines can read
EG Before
www.mysite.com/defualt.asp?productID=98283?etc...
EG After
www.mysite.com/product/ID/default.asp
It basically takes the question amarks and weird characters out and replaces them?
Does anyone know where i can get ths peiece of software or what has to be done on my server?
someone please help me :S
Chris
View Replies
View Related
In asp how How can i pass a parameter value with a space in the value like this:
test.asp?catalog=aValue&lineitem=ladies cloths
I get a %20 as a space in the browser window,
View Replies
View Related
I'm trying to encrypt query strings.
For Example...
I want this...
http://whatever.com/?clientID=5
to be something like this...
http://whatever.com/?[encrypted string]
I've seen the 4guysrfromrolla's version. Its fine "but" I don't know
if it would be practical in this case. I would need to encrypt many
urls on a single page and every link on a displayed page would be
pulled from a database. the "rolla" version I came across requires
that a text file be created and key written for each encoded string
everytime the page is called. This doesn't seem that practical to me
because I would be writing files and keys dozens of times everytime the
page is called.I've also seen aspEncrypt but they want 250 bucks and I was hoping to
avoid this. I also see that .Net has a method for this but I'm only
working with classic at this point.
View Replies
View Related
I want to pass a querystring in two files using frameset. I'm using Frameset. I'm using this query string. MY question is this can we pass a single value to (2 different files,) using querystring? Code:
<%
response.Write("<a href=""grid1.asp?strID="&rs.Fields("alphabit")&""" target = ""grid1""grid2.asp?strID="&rs.fields("alphabit")&""" target = ""grid2"">"& a &"</a>")
%>
It only show the value of rs.fields("alphabit") in grid1.asp and nothing show in grid2.asp
Actually I'm using "FrameSet". I just want to pass this value in two frames(in two files).
In short i want to get the value of rs.fields("alphabit"). in 2 Frames.
View Replies
View Related
I am working on a site to provide displaying and navigation of images from
several groups and have the following code that changes to displayed gif
based on the query string passed in:
Call: <a href="ShowImage.asp?group=01&image=01&max=28">Group 01, Image 04,
Max 28</a> Code:
View Replies
View Related
i have designed a website that is using an asp shopping cart script and has a flash header which i have designed to display different content depending on the query string that gets passed to it in the page url. now my problem is that my script has a lot of pages and there are many ways of going from one page to another.
what i im wondering is if ther is away that i can make an asp page directly append a query string to the url when the server generates the page and sends it to the browser.
So basically if say i had a page called home.asp when i opened this page a some code in the page make the page serve as home.asp?page=home&content=logo which would make my flash script display content according to the query string it has received.
View Replies
View Related
I have a search page with 7 different field options to search upon. The user
can use any or all options. On the results page I'd like to put at the top
of each column and ASC and DESC link to resort the results in the user's
choice.
How do I save that original query string to reuse in the sort links?
My results could spread across many pages, so I'm guessing that I would have
to query the database again for each sort.
View Replies
View Related