How Can I SELECT By Two Fields In A Linked Table (2 Degrees Away)?

How can I do this in a single query (or query-subquery)?

Return the Rows of all books in the CATALOG that...

- are tagged with one category

- are also tagged with a second category

CONTEXT:
This is a 3-table db
Many-to-many (each book may have many categories & v.v.)

- bookCatalog is the main table (with fields for each book's unique data, primary key is Ref_no)

- bookCategoriesLinkTbl is the linking table (it has two fields: category_ID and Ref_no)

- categoriesTbl has only 2 fields: category_ID and categoryName
It's an Access 97 db Code:

View Replies


ADVERTISEMENT

Drop Down List With Linked Fields

I want to create an asp page from these forms in my database:

Database:
Table 1 =>
1.1) ID:
1.2) Product Name
1.3) Description

Table 2 => For the ASP Form
2.1) ID:
2.2) Text field 1 (Normal input field)
2.3) Product (Dropdown Menu, Data Source Table 1, Field 1.2)
2.4) Description (Text Field, Data Source Table 1, Field 1.3)

The Description value should be in correlation with the Dropdown Menu value in Table 1

View Replies View Related

Select Different Fields In Multiple Tables

I have 4 tables first table category (category_id and category name in it)
second table artist (artist_id, category_id, artistname in it)
third table album (id, artist_id, album_title in it)
forth table song (id, album_id, title in it)

I'm selecting category in first page
I'm selecting artist in second page
I'm selecting album in third page

I'm requesting, collecting and posting all id's to the next page.

this is the question!!

How can I read from database

1- category name when I was selected in first page
2- artist name when I was selected in second page
3- album name when I was selected in third page

View Replies View Related

Table & Fields

I'm creating a On-Line Order system and have got for the most part all done. My question is:
I have one table that I'm having all the orders entered into. As each order is entered in it assigns a record number. Since we have over 2000 item to purchase I don't want to create that many fields.
Is there a way that when they approve there order and I have it enter it into the orders table that it will create field automatically?
Each item has three information points (Item Number[itemnum], Description[desc], and Quantity[qty]) that needs to be added for each item they order.
I don't want to create a record number for each item that they are ordering

View Replies View Related

HTML Encode And Select Form Fields

I have downloaded and installed an ASP Calendar offered for free by Manohar Kamath from his website. I've modified it to accept two new fields (sStart_Time & sEnd_Time). I want to be able to have drop down selections for the time entry, but do not know how to accomplish this.

Please take a look and tell me if this can be done using the <% =Server.HTMLEncode(sStart_Time) %>"> value for this piece or if there is some other way to accomplish this, please let me know.

If I leave it as the following, it works OK, but I want to make it easier for people who are adding to the database: Code:

View Replies View Related

Parsing Information Using Onchange In Two Select Fields

I'm having an asp page with a form with an action pointing to itself. The reason for that, it that the asp page depending on changes in any of two select fields with data from 2 different databasetables are going to populate a third select field. Code:

View Replies View Related

Check All Fields In The Table

I want to Export a dbf file to Access. How do i check if all the fields required are there in the .dbf file that means no field should be missing in the dbf file. Can i do it with Error Handling .

View Replies View Related

Fields In The Table Are Empty

how to determine the fields on a table if their empty?

View Replies View Related

Select All From One Table That Are Not In Another

i have to tables:

table 1
FID
username

Table 2
FID
filename
display name

i need to show all fids from table 2 that are not in table 1 for username justin.

View Replies View Related

Updating Data In One Field In A Table Into Two Fields In Another

What i am trying to do is Update data in a table with data in another table but i want to update 2 fields in the destination table with data from 1 field in another table.

These are the table i have and their fields:

*CUPFirstRound* - Table1
GameId
GameDate
Home
Away
HomeScore
AwayScore
Winner

There are 8 rows in this table, thereofre the GameID's go from 1 to 8 Code:

View Replies View Related

Querying Two Table In One Select

Is there any way to quiry two tables in one select command to limit the number of database connections. One quire displays members from a members list the other quires achievments for each member. i.e.

select name, memberno from memberlist
then select * from achievements where member = memberno

currently this is done by a loop which requires lots of connections

View Replies View Related

Complete An Access Table Through A Select List

I would like to know if it is possible to fill in an access table through a select list inside an APS 3 web page. If yes, how ?

View Replies View Related

Integrating Asp Into A Table To Auto Generate Rows From A Select Statement

Im running a select statement to a database and wish to display the relevant records into a table. For some reason, its not liking this - can someone see why, and or tell me an easier way to produce an 'automatically generating' table of results.

<% @language="vbscript" %>
<% Option Explicit %>
<% Response.Buffer=True %>
<html>
<head>
<title>Search Results</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#FFFFFF" text="#000000">
<!-- #include file="dbConn.asp" -->
<!-- #include file="adovbs.inc"-->
<h1>Your search results returned the following popup messages:</h1>
<% Dim msgtype, title, message, url
msgtype=request.form("type")
title=request.form("title")
message=request.form("msg")
url=request.form("URL")

Dim adoDB, adors, strSQL
set adoDB = Server.CreateObject("ADODB.Connection")
adoDB.Open strConnection
set adoRS = Server.CreateObject("ADODB.RecordSet")
strSQL="SELECT PID,P_TITLE,P_MSG,P_URL,P_TYPE FROM POPUP WHERE ("
If msgtype <> "" then
strSQL=strSQL & "P_TYPE='" & msgtype & "' "
If title <> "" then
strSQL=strSQL & "OR P_TITLE LIKE '%" & title & "%' "
If message <> "" then
strSQL=strSQL & "OR P_MSG LIKE '%" & message & "%' "
If url <> "" then
strSQL=strSQL & "OR P_URL LIKE '%" & url & "%' "
End if
strSQL=strSQL & ")"


'DEBUG ONLY!!
'response.write strSQL
'response.end

adoRS.Open strSQL, adoDB
' Loop through the recordset to display the records
Do While Not adoRS.EOF
& " <tr> " &
& " <td> " & Response.Write adoRS.Fields("PID").Value & " </td> "
& " <td> " & Response.Write adoRS.Fields("P_TYPE").Value & " </td>"
& " <td> " & Response.Write adoRS.Fields("P_TITLE").Value & "</td>"
& " <td> " & Response.Write adoRS.Fields("P_MSG").Value & "</td>"
& " <td> " & Response.Write adoRS.Fields("P_URL").Value & "</td></tr>"
adoRS.MoveNext
Loop
& " </table> " &


' Tidy up afterwards
adoRS.Close
Set adoRS = Nothing
adoDB.Close
Set adoDB = Nothing

%>

</body>
</html>

View Replies View Related

Linked Tables

I have a database that has 2 tables linked into it from another database. I am having problems trying to pull in values from those 2 linked databases. One of the tables is tblClient. Code:

View Replies View Related

Linked Tables

Ithe goalposts have been moved (yet again!) and the database that was one, may have to become many, being used on subdomains of the same server sharing some information but not all from a 'global' database.The solution I initially found was to used linked tables and developing it on pws - this was perfect. I linked local databases to the external table data in the 'global' database hey presto the application ran smoothly. There was only 1 connection to each local database and I could retrieve all the information I needed from the global one. However on uploading I have no idea how to set this via asp or sql as online the path of the linked tables is what was on my local machine and I have found no way of being able to edit this or indeed know if this is possible.

View Replies View Related

Linked Combobox

I am using one combo box and populating it with the values . i have another combo box on the page. I want to display the related values in this second combo box based on the selection in the first combo box.

I am trying to reload this page on the change event of the combo box but the values are not coming in the 2nd combo box . Please send me a solution to this or if possible a sample code for the same.

View Replies View Related

Linked Tables?

im trying to link to a Access db which uses linked tables via a odbc connection... is there anything different about the connection string / driver?

adoConnection.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("Resources/peterjohntest.mdb")

but this error comes up Code:

View Replies View Related

Show If Linked With Sessions In ASP

I have a "booking" section on my intranet.

2 questions.

1. Can I, say by session, determine if a user logged in can amend/delete data they have entered? But no one else.
Say they book a conference room, but only they can delete it

2. I want to prevent cross bookings (in terms) of time.

View Replies View Related

Opening Linked Tables

I have an Access DB that has a linked table to a SQL Anywhere DB. When I try to access this Access DB, it prompts me the first time every time for username and password to the SQLA DB. This isn't a problem when it is just me that is working on development, however,

I figured MS would have something good to say about this issue, so that my users can use this DB as well. MS says I need to pre-open the table using the same credentials for both DB's. I have tried this several ways, and am still unable to open the linked access DB.

The error I get is that the DSN=xsellvehicles (this is the DSN that is used by Access to open the table that resides in SQLA) can't be used because the username or password doesn't work.

View Replies View Related

Resizing Linked Images

I've been tasked with the challenge of re-sizing images linked via BBcode on the fly. I have compiled a list of functions that do individual components of this task, but stringing them together has proved, well, a challenge.

I discovered this code that will re-size the images, however this will need to be added on an ad-hoc basis, and the fact that the image name appears twice complicates the usual system I used to add the code.

Usual way of replacing the code (inside a function):

Code:

vText = Replace(vText,"[ img ]","<div align='center'><img align='middle' src='")
vText = Replace(vText,"[/ img ]","'></div>")

Image resize code:

View Replies View Related

Three Linked List Boxs

if you have seen an example floating around on the internet of three linked list boxs using asp code and a database connection. I have managed to get it to work for the first 2 list boxs, but I am unable to get it to populate the third list box, this is how it is:-

Tables:-
Main_cat
Sub_cat
Subsub_cat.


Not all Sub_cats will have subsub_cats, hope this makes sense. I have attached the code.

View Replies View Related

Linked Drop Downs

how can i change the options of a combo box when selecting an option of another combo box?

View Replies View Related

Linked Form Menus

I currently have a page with car manufacturers in a dynamic form menu. Users can select one and click submit to find available cars by that manufacturer. What i now need is a second menu on the page where when a manufacturer is selected, the models associated with that manufacturer display for a user to choose. For example if Ford is selected:

Menu One Menu Two
------------------ -----------------
Ford Focus
Fiesta
Ka....

Can i do this with ASP to say "if menu one is ford, menu two contains...."? Or is there a much easier way which i am somehow missing?

View Replies View Related

Dynamic Triple Linked Dropdowns

Code:

' then set up a query
' -----------------------------------------------
sQuery = "SELECT DISTINCT * from tablename Order By columnA, columnB " ' << insert your own sql here

could someone give an example so I could follow it?

View Replies View Related

Dynamically Linked List Boxes

I want to link 2 list boxes on the same page without reloading it. The list boxes are dynamic and when one selects an item in the first one, the second one get's populated accordingly. So far I've been stuck with Javascript Object Expected Error and I cant find a way to make it work. Code:

View Replies View Related

Images Won't Show Linked From Access DB

I am unable to show and image or flash i have in an access database that is linked to an images subfolder, below is what i am using to show text on my ASP page but i want to ad a couple of images to the database to show in different locations on the page or pages, so i guess i needed a call function but ive used the one i have on my database image rotator scipt and a few others i have dowloaded and still the call scripts wont work, i'm sure im doing alot wrong can someone please edit this code and show me what to do... if its no bother

This works fine for showing the text on a page:

<%
Dim rs
Set rs = Server.CreateObject ("ADODB.Recordset")

rs.Open "introtext", "DSN=introTXT.mdb"

While Not rs.EOF
Response.Write "<br>" & rs("Content") & "<br>"
Response.Write "" & rs("URL") & ""
rs.MoveNext
Wend

rs.Close
Set rs = Nothing
%>

View Replies View Related

Two Linked Dynamic Drop Downs

I want to make a form where m using two drop down menus.

Where in based on selection in first drop down the second drop down should populate itself with relevant data based on first drop down. Like first can be COUNTRY name and second can be STATE name where based oon country selected the STATES are displayed in second drop down for selection.

View Replies View Related

Form With Linked Drop-down Lists

I have an ASP-page where I want to be able to select a fabric and color of that fabric. Since different fabrics comes with different colors I want to have a form with two drop-down lists where selection of fabric in the first list populates the second list with the right set of colors. I need to have the lists in the same form so it only require one submit.

View Replies View Related

Restrict Linked Image Width

I'm creating a forum based site with basic BBCode features, but am concerned that misuse of the [ img ] tag will mess up my layout. I do not want to go down to road of users uploading images, but want to allow them to embed images from flickr, photobucket etc.

So, is it possible to restrict all linked images that are say, over 400 pixels wide? I've been racking my brains and have had trouble coming up with any solutions. Is it possible?

View Replies View Related

Exporting To Word Using ASP - Need Linked Images To Be Embedded

I have an application in ASP that exports to Word using the Response.ContentType method.

The application references another ASP page through the img tag that uses a Response.BinaryWrite (of an img content type) for its output.

In other words:

App A.ASP contains the code: [...] <%Response.ContentType =
"application/vnd-msword"%> [...] <img src="B.ASP">

Then B.ASP contains the code: [...] <%Response.ContentType = "image/png"%>
[...] <%Response.BinaryWrite BinaryObject%> [...]

When Word opens and the document is saved, it references the images as links. I need to have these images be embedded as the file will need to be emailed outside of the network.

I can go in and manually break the links and save them as embedded files, but this process needs to be automated as users will not know how to do this.

Is there a way to force these images to be embedded instead of referenced as links when the Word doc is intially created?

View Replies View Related

Reading Linked Server Stored Procedure

I've got a stored procedure which returns a select query on a linked server. This works fine if i call within SQL and Query Analyser but if i try and execue to return data to a ASP recordset i get the ridiculous

Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC SQL Server Driver][SQL Server]OLE DB error trace [OLE/DB Provider 'MSDASQL' IDBInitialize::Initialize returned 0x80004005: The provider did not give any information about the error.].

Am i missing something really basic like a simple setting or is it just not possible.

Heres my ASP code: ...

View Replies View Related

Creating Linked Pull Down Lists With VBscript

Trying to figure out how to make a pulldown menu, which when something is selected, another pulldown menu comes up with limited options (based on the input from the first). I've seen examples using Jscript, but none using VB. The rest of my page is done in VB. Any suggestions? Is this possible?

View Replies View Related

Linked 'tables' (access) Local - To -remote

Is it actually possible for a local access 2000 database to link to a remote database online via linked tables. I just wanted to know how feasible a LINKED TABLE scenario would be.

If this was possible it would solve so many administration problems and save development time when it comes to building asp-admin pages to manage the backend.

View Replies View Related







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