Accessing a Database

I am trying a access a microsoft database, and I set a an ODBC to the access database.. but when I open this in a browser, I get this error:

Error Occurred While Processing Request
Error Diagnostic Information
An error has occurred.
HTTP/1.0 404 Object Not Found


Any help would be greatly appreciated....

<CFQUERY DATASOURCE="cfexamples" NAME="rich">
SELECT FirstName, LastName, Title
FROM EmpEmployees
</CFQUERY>


<html>
<head>
<title>
EMAIL
</title>
</head>
<body>

<CFOUTPUT QUERY="rich">

#LastName#, #FirstName#, #Title#

</CFOUTPUT>

</body>
</head>
LVL 2
cookmysterAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
cheekycjConnect With a Mentor Commented:
Here is my answer:
make sure that the datasource is specified under your ODBC panel
and that in ColdFusion you can connect to it (it should be in the CF
config page)

CJ
0
 
BrigidCommented:
A 404 error means that the file does not exist. Be sure you are typing the correct path to get to the page you've made, and that the page does in fact exist.
Besides ending with a /head tag instead of a /html tag, there is nothing wrong with your code if you reference your variables with the query name. i.e.: rich.LastName
0
 
cookmysterAuthor Commented:
it didn't work... any other suggestions????
0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

 
cheekycjCommented:
make sure that the datasource is specified under your ODBC panel
and that in ColdFusion you can connect to it (it should be in the CF config page)

brigid:  Why did you submit that as an answer?  Your comment is correct/accurate but I don't think it answers what is wrong.

CJ
0
 
BrigidCommented:
>>brigid:  Why did you submit that as
>>an answer?  Your comment is
>>correct/accurate but I don't think it
>>answers what is wrong.

If it does not answer what is wrong, then cookmyster should reject it.
S/he asked what was wrong with the code, I answered to the best of my knowledge based on the information given. It was an answer, that's why.
0
 
cookmysterAuthor Commented:
Hey cheekycj..  submit an answer.. it worked thanks
0
 
cheekycjCommented:
bigrid... usually what goes on here .. is that you make suggestions (in the form of comments) until the problem is solved and then usually the person asking the question will ask the best comment/suggestion to post as an answer. It prevents the question from being locked and then more people will come and help.

Cheers,
CJ
0
 
BrigidCommented:
Someone should suggest that be added to a "rules" or FAQ page, probably somewhere on the Help Desk page, since this is the first I'm hearing of it.

No one can be expected to follow "rules" that don't exist anywhere.
0
 
cookmysterAuthor Commented:
It is kinda an unwritten rule.. I had to learn when I first starting using this site....  At least you know now...
0
 
cheekycjCommented:
yeah.. I learned it the hard way to but like cookmyster said... At least you know now.

CJ
0
All Courses

From novice to tech pro — start learning today.