Presenting Query Results

I need to create asp page witch has a form at top of the page. This is the search form. Then I need to present the search results from database query on the bottom of the page as a table. That table has about dozen columns. Some column values can be modified and saved to the database and some column values has to be modified and saved from another page.

Search table is no problem but I have problems getting the results table to work right... Query results are in recordset.

I need some advice on how to do the results table on the best way!

So far I am thinking on creating a form on every row of results and posting the changes of values to save.asp page where I would save the modifications to database.

For the values witch have to be modified on another page I would add a link something like this... Code:

View Replies


ADVERTISEMENT

Presenting Database Results In A Repeater Control

I am using a repeater control to display the results of a database query. The problem is when outputing the results of a multiline nvarchar field.

I generally try put it in a <pre> tag and try to enforce the table width. However this doesn't help and the table width when viewing the page is the width of the page, and not the specified width. Code:

View Replies View Related

Displaying Results From SQL Query

I'm stuck on trying to display a single row from a query I'm executing.. it was fairly easy in PHP and I'm sure it is in ASP too, I'm just not sure what to code.. I couldn't find anything on the web that was simple.

If anybody has some suggestions on how to display just the one row that is returned from the query that would be great for now. I'm looking to eventually add 'LIKE' to the query to allow for similar names/passwords to be displayed.. but for now this should do. Here's the code:

View Replies View Related

Writing Query Results

I want to write all the query results onto a file so that it is all ready to give to the client.
I am currently writing a query to pull out certain orders in a day and i want to write these results directly to a text file.Also this text file will be obviously placed on the server..is there any way of creating this file on the computer you are accessing this web page on?

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

Multiple Results From One Query

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

Streaming Query Results

I am working on a classic ASP application. This application needs to run an SQL query and take the result set and stream it into an XCEL spreadsheet for processsing by the users. Is there an ASP method of third party product to do this?

View Replies View Related

Displaying Query Results Per Where Clause

I am trying to design a page that displays data from a query in groups of a field in the where clause and then displays a 'total' per each group. Code:

View Replies View Related

Displaying CrossTab Query Results

Has anyone experience with rendering CrossTab Query results with ASP?

For example, using this SQL:
TRANSFORM Count(threads.threadid) AS CountOfthreadid
SELECT threads.threadSeverity, Count(threads.threadid) AS [Total Of threadid]
FROM threads
GROUP BY threads.threadSeverity
PIVOT threads.threadStatus;

This returns the following in Access:
[threads_Crosstab] [threadSeverity] [Total Of threadid] [Analyzing] [Closed] [Coding] [Open] [Re-Testing]
[Medium ] [1] [1]
[Not Set] [160] [1] [122] [1] [35] [1]

I want to create a HTML table to display the results in my webpage. However, I don't belive the output from a "Transform" is a true recordset. When I request the names of the fields in the recordset, I am getting data from the "rows".

Is there standard way to display these types of queries? How does one access the data in a crosstab query? Are there ojbect classes to handle this?

View Replies View Related

Limiting Results From An Access Query

I'm attempting to limit a query which is being ordered by a date field to 10 records. The date field contains duplicate values, which are sorted from most recent, back.
However their suggestion of sorting by a secondary field is not providing acceptable results (it returns all the rows in the database). Does anyone have any suggestions of another way around this?

View Replies View Related

Using ADODB.stream To Get Results From A Url Query

I have an asp page that needs to display the string that is returned from a
cgi file.

As an example, if you enter http://mydomain.com/mycgi.cgi?98127398 in to a
browser, it will display YES or NO

I need to have my asp code query this url, get the resulting string, then
act upon it (basically use the answer to display a nice big tick or a big
cross). Code:

View Replies View Related

Error-checking And Query-results After Execute

After commands like:

tmpDBconn.Execute("DELETE * FROM mytable WHERE rc_id = 10" )
How do I check for errors?
Is there a way to check the results?

OR:

Set rsCatCount = tmpDBconn.Execute("SELECT COUNT(*) FROM cat WHERE key_id = 10 AND cat_id = 6")

How do I get the count? Do I use rsCatCount(0)?

View Replies View Related

Asp Search Returns No Results From Access Query

here's what i want to do. from an asp page, perform a search on a
table in access. i have used sql code in the asp page itself, but i'd
rather execute a query in access. i have success in running any query
(basic SELECT, SELECT with conditions _other_ than LIKE, etc..) for
some reason, when i execute the query below from the asp page, i get
no results.

the search.asp page just has a text box in a form that submits the
srchBOX field to the results.asp page.

here's the asp code from the results.asp page: Code:

View Replies View Related

SQL Query Not Returning Results In Access For Dates

I am trying to search through an access database for tickets createded with in a certin date. I am using the below code.

strdate = DateAdd("d", -2, Now())
sqlstr="SELECT * FROM Incidents WHERE TicketDate BETWEEN #"& Now() &"# AND #"& strdate &"# ;"

I verify the query with response.write and get the following.

SELECT * FROM Incidents WHERE TicketDate BETWEEN #15/07/04 19:19:32# AND #13/07/04 19:19:32# ;

I know there are 100% tickets within this date. Yet my query returns nuthing. Please help i've searched this forum for other peoples code looking for examples but end up with the same result.

View Replies View Related

Storing Content In DB And Presenting It In Browser

I've got a bit of a problem which I need sorting. I'm creating a news system on our work intranet. The main content is entered into a textarea which most people will use as a simple text editor (carriage returns for paragraphs).

The advanced users will be able to enter HTML tags for more advanced articles (lists, character formatting etc). The problem comes when I'm rendering the text.

At the moment, I'm storing the content as it is submitted (carriage returns are stored as carriage returns, not <br>'s). When rendering the articles to the screen, I replace the carriage returns for <br>'s.

The reason I don't convert the carriage returns to <br>'s on submission is incase the content needs to be rendered for another program/platform in the future (we use all sorts of software from the same database at work so it is a possibility at the moment). Code:

View Replies View Related

Need To Convert This Sql Query For Access To Identical Sql Query For Sql 2005..

My code retrieves a username and a password from a form. Then this information is compared to some usernames and passwords that are stored in a database. The important thing here is that the comparison must be case sensitive meaning that "passWord" is not the same thing as "password"

I have this code, working fine in access 2003

SQL = "SELECT * FROM users WHERE StrComp(username_column,'" & entered_username_in_form & "',0) = 0 AND StrComp(password_column,'" & entered_password_in_form & "',0) = 0"

but get the following error when I run it against my sql 2005 database.

[Microsoft][SQL Native Client][SQL Server]'StrComp' is not a recognized built-in function name.

I don't know the corresponding t-sql for the query.

View Replies View Related

Query A DB - Pass The Query To Next Page

I am running a querry on an access database and have set the number of records/page displayed at 20. if there are more than 20 records returned, then 1st page will show the first 20, the next page will show next 20 and so on....

The trouble:

the count of total records displayed is correct and the first page is displayed correctly. But when i click on *Next* to go to the next page, all the records of the database get displayed (not the 2nd page of records from the query).

View Replies View Related

Query Access With Multiple Query

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

ASP LIKE Query Using Parameterized Query

In Access you use "*" + [passed variable] + "*", + can be replaced with &
Calling a parameterized query in Access requires % be used in place of *,
however, all that I have read show dynamic SQL passed to Access:

WHERE [some column] LIKE '" & ASPvar & "' % ORDER BY ...

However, my call is similar to:

conn.qMyLookup strVar, rs

If I modify the query in Access to:

"%" & [passed variable] & "%"

I get all records. If I only put it at the end, as suggested, I only get
matches at the end, not throughout the column. Code:

View Replies View Related

SQL 10 Last Results Only

Anybody know how to get only the 10 latest results of an SQL query ?(in SQL)

View Replies View Related

Stripping Results

i have a record that is returned by the database as domain/username. i want to be able to strip off "domain/" and just display "username". is this possible? if so, how would i go about doing this?

View Replies View Related

Trimming Db Results

i don't know what to do here exactly.
i have seen the TRIM function, but i'm not sure if it's the right way to do it.
i have a recordset called RSUSEREDIT.
in the recordset there is a column called "EMail".
i can print out the results using Code:

<%=RSUSEREDIT("Email")%>

the email column always uses the same domain name... - username@domain.com
is it possible to remove the part after and including the "@"?

View Replies View Related

Results Of URL To File

I have a URL... everything returned by the url, I need to write to a file. lets say its 40 lines of text... how can I write it to a text file and save it??

ADODB stream?
FSO?
DomObject?

View Replies View Related

Seperating Results

I'm creating a site that pulls details from a database & display it on screen. Problem is that there's sometimes loads of data which makes the page huge. What I want it to do is display ten and a next page link to display the next ten. Like the way Google displays results. Problem is I don't know how to generate pages on the fly. So the question is can it be done and does ne1 know how to do it?

View Replies View Related

Filtering Results

First, thanks to all who have helped me over the last few weeks !!
I have a form that allows the user to select multiple options.
These are user names:

Fred S
Bob D
Paul G
Dave O

When the form is submitted, I'm getting the details using

user = request.form("user")

this is returning the mutliple options.
What I would like to do is pass all the options to 'user' but at one
point on the results page only show the first user selected, not the
multiple selection

View Replies View Related

Ordering Results

what is an easy way to go about sorting my search results through links, you know, like clicking the link at the top of a column. i know how to pass the order by in a querystring:

http://www.example.com?lastname=smith&firstname=john&state=GA&orderlast=desc

where orderlast is the order querystring.

but what about all the other links? what do I do with the previous querystring entries like lastname, firstname, and state? i find if i add orderlast to my lastname column and i click on it, i will have 2 orderlast querystrings

View Replies View Related

Recordcount Results

I'm using multiple recordsets on a page, and they are all returning correct results and enough of them. My problem is when I try to access the recordcount property rs.recordcount, they all return a result of -1. This would usually mean that no records are returned. So why is showing my recordsets that are displaying records with recordcounts of -1. I can't seem to figure out.

View Replies View Related

Display Results

what I need is to dysplay only the first say 10 results and then have a link 'next' and dysplay 10 more in a new page

result
result
result
result
...
next

I can create a var and add 1 more for each result, till 10� end then create the link, but i don't now how to start the new page from the 11� result.

View Replies View Related

Using Bbc Code With Results

I know how to display results that contain html code on a page. (ie. <br>
<b>...)

what i would like to know, is if a result contains bbc code (ie.. [code]
[url]..) how would i display that to be readable?

This is not for a forum, but would be the same as if i was writting a forum.
I think there is a script that the page has to contain to be able to read it
correctly, but I can't find it.

View Replies View Related

ASP Different Results In Firefox And IE !

I have following code, picking an ID and saving it to Cookies.

<%
ItemID = Request("prod")
Response.Cookies("THREES")(ItemID) = Request("prod")
Set rdset=objConn.Execute("SELECT ID, Name, Large, Description
FROM shop_products WHERE ID=" & ItemID)
%>

In IE it works fine as it should, adding item id to Cookies

In Firefox it gives me the following error:

Cookies object, ASP 0102 (0x80004005)
The function expects a string as input.
/shop/addcart.asp, line 27

Any information on that. Any idea what is going wrong.

View Replies View Related

Return Results

My SQL statement won't return results where any field in a record is blank. What can I do to fix this?

strSQL = "SELECT * FROM newarchive WHERE Program_Title LIKE '%" & program & "%' AND Year_Aired LIKE '%" & yearA & "%' AND Sponsor LIKE '%" & sponsor & "%' AND Month_Aired LIKE '%" & monthA & "%' ORDER BY ID"

It gets its values from a form where some fields can be left blank. If the record itself does not have a blank field, the search will pick it up. But if the record contains a blank field, then it won't be selected unless it matches the Program_Title data.

View Replies View Related

Getting The Results From Executing An Exe

Is there any sample about getting the results from executing an exe using
asp?

View Replies View Related

Searching Results

I know how to use the LIKE command in a query but how do I do it in the
results of a recordset results="<b>Hello</b> World"

I want to search the above result and if it has a <B> in it, I want set
hasabold="Y"

I need to be able to search through a large amount of text so the BOLD marks
will not always be at the front of the results. They maybe be on line 50
character 59,

View Replies View Related







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