Displaying Complex One To Many Relationship
I want to display a kind of two-tier one-to-many relationship, for
which, in the olden days, I would have used a series of nested loops
and multiple calls to the db. Code:
I want to display a kind of two-tier one-to-many relationship, for
which, in the olden days, I would have used a series of nested loops
and multiple calls to the db. Code:
ID From To Date
1 Tom User1 10.10.2004
3 Tom User1 10.11.2004
4 Tom User3 10.08.2004
5 Tom User2 10.05.2004
6 Tom User2 10.10.2004
7 Tom User2 10.11.2004
Tom sent messages to him friends.
He sent messages to User1 for 2 times.
to User3 for 1 time
to User2 for 3 times..
I want to show to Tom how many messages he have send so far.
the quene is much more important for me.
I need like above.
You sent messages to User2 for 3 times
You sent messages to User1 for 2 times
You sent messages to User3 for 1 time
the important thing in the quene is that "who Tom sent messages to most?"
how can it be with only one sql query?
If there is three table,
let say A,B and C
C store the B id, and B store the A id
now what i trying to do is search from C table to get result in A
and display the result from A table..
hv any idea?
I have big issue over here....and i seeking help from u all.....well u see I have 2 asp(dreamweaver mx) pages with contained insert data server behaveiour....the problem is the database which connected to these 2 asp pages is contained 2 table which is link relationship....so when try to insert data to the secondary form it came out wit an error stated cannot update or insert data to the table because of contained relationship
View Replies View RelatedI have a query to one table but one of the values in the table is referencing a record from another table... here is the sql Code:
strSql = "SELECT streetdate, barcode, itemname, descrip, vendor, sku, catlog, config, retail_cost, cost FROM blah WHERE (STREETDATE >='"& GSTARTDATE &"') AND (STREETDATE <='"& GENDDATE &"') ORDER BY STREETDATE, CATLOG DESC"
now I have 2 things going on here...
1. vendor is just a number... there is a tblvendor that matches the number with a name (that i need.. i coudl nest another db query but figured that would be more resource intensive as this returns 1000s of records)
2. itemname is also a number that references another tblItem the sam way, I woul dlike to sort alphabetical off this somehow (is it even possable)
I have a web interface where I can upload images. I have two tables, one table holds thumbnail images and the other table holds the full scale version of the thumbnail image. So, in my web application, I have one form that uploads the thumbnail image and inserts all the relevant information into the thumbnail images table.
I have another form that uploads the larger image and inserts all the relevant information into the table that holds the information for full scale version of the image. The problem is how can I relate the thumbnail image to the corresponding full scale image?
I have to insert the thumbnails and larger images in the same sequence so they have the same id numbers. I'm trying to find a way to upload the images in any order and still have the correct relationship between the images.
I have a blog who created pages this way: article.asp?id=222
and I'm using a sort of asp urlrewrite. It works perfectly with creating the articles etc, but now I have to put a "301 moved permanently" in the old article.asp page.
I have a function which converts the title of the article to a page name, using title and id: Code:
I need some help optimising my object design. Since one article has 1+
authors, I assume the logical way to represent this is for my Article object
to have a Authors property, of type "array", capable of representing any
number of authors.
The code I have written (below) works, but is very inefficient; if I want
the asp page to fetch a list of 30 authors using GetAuthors(30), there will
be a total of *31* calls to the database - one call in GetArticles(), and
one call to GetAuthors() for EACH article! Code:
I am trying to write a regex function that will find all html tags with an id= value and get it to return the tag and value of the id.
i.e. <a href="blah.htm" id="someLink"> would return
a someLink
Any help would be greatly appreciated, this has got me very frustrated.
It will most likley be a very simple thing that I have missed.
I am trying to get my code to delete a related record in a one-to-one relationship. The code I am trying is as follows:
mySQL = "DELETE FROM tblPurchaseOrderLine WHERE ((tblPurchaseOrderLine.lngPurchaseOrderLineID)="& PurchaseID &");"
myRS.Open mySQL, objConn, 1, 3
However, tblPurchaseOrderLine is related to tblAccessoryPackOrderLine of lngPurchaseOrderLineID. Do i need to reference both table in the statement?
I am currently using a single list box and select case to carry out a search for resources on my website. I would like to improve my search by adding two or three more drop down menus to achieve a single, more detailed search.
Hopefully this will help the end user find what they are looking for. unfortunately the current search is rather broad and i need to narrow it down. How do i go about achieving this?
(I include a bmp file to make sure u all understand what my problem is)..as U all can see from the bmp I supply with this message.. I got 2 Table which is Master and Child table...the problem is I kindda want to make it like a Parent Child Relationship like In ms Access.
View Replies View RelatedI have knowledge of programming ASP pages, HTML, Vbscript and making/connecting to MySQL databases with SQL queries. I am prepared to learn new things if they are required, but ideally if it can be done using the above, or slight additions to the above it would be great!
I would like to get data off of the web. What I mean by this is that there might be a site that has a table on it. Is it possible to make a script take data out of the browser window (just thinking about it sounds difficult!).
If not, is there an easy way to get a script to dump the information (i.e. the source code of the page) into a .txt file or something that can be read by a script. Alternatively, would automating the pasting of the table into an excel spreadsheet be possible. Code:
I have XML and XSL documents stored in SQL Server 2000 field. On the asp page i will be getting these documents from the database and then displaying the content of the XML document according to the XSL on the asp page. How can i do this?
Also after getting the documents from the database do i need to store these on the server as .XML and .XSL and then read through these or i can directly read from these document without saving these physically.
Archived XML and XSL documents are attached.
I'm pulling data into ASP from Sybase IQ. When the data is in the
database its displayed correctley: //C://.... When I pull it into an
asp page, the formating changes, and a few of my slashes disappear. Is
there a special method of pulling slahes into asp?
I have this error: [object Error] WinHTTP returned error: 12006 The URL does not use a recognized protocol Code:
View Replies View RelatedSay i have the following names displayed on a page.
ABCD
CDFG
FGHI
Now if i click on ABCD,this name should get displayed in the text boc.I dont want to have a submit button.
I just want to basically select this name and the moment i select this name ,it gets displayed in the text box and thn i hit submit and the value in the text box hits the DB.
I have an access database and users can search through it. Is it possible to display the first 20 results on one page and then display the next 20 on another page and so on and so on..
View Replies View RelatedI have a requirement to display a message and then redirect the controls to
some file, I tried with the below method but its not working, where as If I
use server.transfer or server.execute it works but I cant give relative Url
(it will dynamically genrate), If any one has an alternate way, pls respond.
ShowMessage("Hello World")
Sub ShowMessage(sMessage)
Response.Write "<script> alert("& Chr(34) & sMessage & Chr(34) &" );
</script>"
Response.redirect "xyz.asp"
End Sub
When I retrieve this data into standard text boxes (using ASP/ADO) so that
the user can update/file the following problems occur on what I would call
price fields:
10 << I want 10.00
11.6 << I want 11.60
12.89 << this is fine
My MySQL DB holds prices as decimal(10,3) so I know the decimal data isn't
chopped at this point.
Before the data is displayed in these boxes I created the below function to
parse the data before it is written to the boxes: Code:
I'm sure I'm missing something completely obvious, but I can't figure out what. I have a path to an image file stored in a database. I'm trying to align the image to the right, but nothing seems to be working:
Response.Write("<img src='" & rs("faculty_link_to_photo") &"'>")
dispays the photo without any wrapping, but when I try the following, the images go all over the page:
Response.Write("<img align=""right"" src='" & rs("faculty_link_to_photo") &"'>")
Can someone tell me what I'm doing wrong?
I have ASP (classic) code that writes out a table and sets the <img....> tag
with a virtual directory source, e.g. src='/test/imghold/xyz.png', and the
images do not appear on the IE page. The code is from a production site
that works fine.
We just duplicated the web site to one named test and now
the images do not display. The IMG item is in a TD element of a table.
Also, I looked at the "view source" of the page and it shows the <IMG
src='/test/imghold/xyz.png'...> just fine. I even tried it with different
images and none of them show up.
I have a web page that displays properties for sale. The web page links to a database.
The page shows information in the database and the path to the picture.
The code is:
<p><img border="0" src="file:///D:/HousePics/<%response.write
rsData("id")%>.jpg" width="350" height="262"></p>
the rsData("id")% gives the name of the picture file and appends .jpg to it.
When I browse the page on the local machine the page displays ok and the
graphics show up ok.
When I browse to the page at work the grpahics don't show.
Permissions on the folder 'everyone full control', web sharing is enable
for the site.
Following is a function on button click event to display the details of an user.if i include this function page is not displaying.can u tell me where the mistake is? Code:
View Replies View RelatedI done Internet presentation for my client and presentation is placed on Brinkster...
Displaying movies is a part of presentation...
Those are .mov files...
As movie container I use Quicktime...
My problem is:
I have to wait to full movie loading...
Wait and wait...
When the movie is loaded then display starts...
Sometimes, it can take a long time...
I want to achieve effect with movie slider in my Quicktime container...
In other words, I want that movie begins to play before the end of full loading...
How can I achieve this?
My code is here:.....
This code displays all the pictures in a defined folder as thumbnails. That works fine. But I would like to have it roll over onto a new page after a certain number of thumbs have been displayed and a back forward message. Code:
View Replies View RelatedI have a loads of records in an Access database relating to publications. The publications come in 3 forms, pdf, Word or .htm so I have fields for each called PDFurl, Wordurl and Publink. What I want to do is, if any of those fields contain a value then display an appropriate icon (which will link to the publication).
I'm ok with the latter part but how do I determine if any of the fields have a value and if so display the relevant icon? Rather than do a load of if then statements I was wondering is there a quicker way of doing this, perhaps using a Case?
Firstly, I am not a programmer, so forgive my complete and utter ignorance of all things ASP related.I am trying to display an RSS feed on a website using some ASP which I found on this website - http://www.tele-pro.co.uk/scripts/rs...d_class_dl.htm
I have downloaded the script and running it locally it works (kind of):-
However, when I put this page on my web server I get an error message:-
http://www.ubsigroup.com/testing/
The ASP file is here:-
http://www.ubsigroup.com/testing/rss...ed_class.1.txt
I have a fairly simple (at least in PHP) request but I can not find how do do it. I've seen things that are kindof what I want but not really. Here is what I want:
I have a ton of data in a DB. I want to pull some of that data and display it in a table. In PHP I would create a SQL query called $Result "(SELCT * FROM whatever)" and produce this code:
I have an asp page in which I am performing the following:
1. Querying a database view
2. Returning rows in to a recordset.
3. Looping thru the recordset and printing the data
4. Before displaying the data I am assigning the values from the recordset
into variables
5. There are 2 entry points to this page both of which would run similar
queries and return similar results
My problem is that for a certain sequence of variable assignments, my data
is not displaying on the screen (even though when i do a response.write I
see that the variable actually has a value in it). In order to fix it I
rearranged the sequence of assignments but since I have two entry points to
the page, it didnot display the data for the other entry point.
I have IIS 5.0 configured in win2k server. When I browse a html I have no problem. But when I browse an asp page, the browser is hanging around.
View Replies View RelatedI only just noticed this on a peice of work i completed. I used JavaScript and ASP to complete the project. A line of my code -
Response.Write("<td align='right' class='results'>" + MyQuery('Date') + "</td></tr>");
was used to show the date (readign from an access database) on the page but the output which was returend in the browser was -
Thu Jul 25 00:00:00 UTC+0100 2002
instead of the date the format - 25/07/2002
is there anyway i can change this so it displays ont he page exactly how it is shown in the access database
After a user selects the 'answer' hyperlink, the answer will be pulled from the database and displayed.
Then i would like another link once selected to remove the displayed answer from the screen. It is important that the answer is not permanently deleted from the database.
I would like to do this for a series of questions.How can i do this?