Re: ASP and Access Database

by "Eric Anderson" <eric(at)blainesoft.com>

 Date:  Mon, 2 Oct 2000 23:48:43 -0400
 To:  "Susan Walsh" <susan(at)equilibriumdesign.com>,
<hwg-techniques(at)hwg.org>
 References:  equilibriumdesign
  todo: View Thread, Original
>
> What I am having problems with is getting my page to display the "Surface
> To" menu correctly.  The values in the "surface to" menu are dependent
upon
> the thickness of the wood selected.  So I have created a table in Access
for
> the "Surface To" values for each thickness, then created a relationship
> between the wood products and the "surface to table".  Instead of getting
> the "surface to" values, I am getting the key number that refers to the
> "surface to" values in that table.
>
> What am I doing wrong?  Is there a way to have the page display the
correct
> "surface to" values without having to pass the wood thickness information
to
> another page?  Is there a trick to setting up the relationship in Access?
> It seems to me that I am making this harder than it should be


Without actually seeing the tables, it's a little hard for me to be sure,
but it looks as though the join statement in your SQL statement is wrong;
that you are only getting the primary field instead of the join field.

Your SQL statement should be something like

"Select woodproducts, surfaceto from woodproducts inner join woodproducts on
surfaceto where woodproducts = 'softmaple' "

Here's the easiest way to solve the problem. Create a new query in access.
Using the query designer, build the query that gives you the results you
want. Then switch the designer to SQL view and cut and paste the SQL code
into your ASP page.



Eric Anderson

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA