Error accessing database

Reply

Join Date: Feb 2006
Posts: 2
Reputation: krazykrisi is an unknown quantity at this point 
Solved Threads: 0
krazykrisi krazykrisi is offline Offline
Newbie Poster

Error accessing database

 
0
  #1
Feb 23rd, 2006
This is not working for some reason it is telling me that ds_products does not exist. here is the code...
<CFQUERY NAME="products" DATASOURCE="ds_products">
SELECT ProductName
FROM tblProducts
</CFQUERY>
<html>
<head>
<title></title>
</head>
<body>
<h1>Product Listing</h1>
<ul><li><CFOUTPUT QUERY="products">
#ProductName#
</CFOUTPUT></li></ul>

</body>
</html>
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 26
Reputation: Walyer is an unknown quantity at this point 
Solved Threads: 1
Walyer's Avatar
Walyer Walyer is offline Offline
Light Poster

Re: Error accessing database

 
0
  #2
Mar 2nd, 2006
Hey Krazykrisi,

Try this, your query is right it’s just your output

***your output was

<h1>Product Listing</h1>
<ul><li><CFOUTPUT QUERY="products">
#ProductName#
</CFOUTPUT></li></ul>

***

The mistake was here,

#ProductName#

It should have been,

# products.ProductName#

You need to include the query name with the column(s) you select within your query.
So if you were searching two things like productName and productType, their part of the output would look like

# products.productName#
# products.productType#


And if you have more than one product to display don’t forget to and a line break “<br />� after # products.ProductName#.

Good luck with everything and take care,

Walyer
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC