Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CF Query MySQL

Status
Not open for further replies.

metaphiz

Programmer
Jun 30, 2004
91
0
0
US
I've been working with MS databases and am giving MySQL a shot. I'm getting an error with the query below, and am battling with the host over whose fault it is! Can someone verify syntax for me?

<cfquery datasource="datasource" name="GetStaff" username="username" password="password">
SELECT *
FROM "staff"
</cfquery>

Here's the error:
Security: The requested template has been denied access to datasource name.

The following is the internal exception message: access denied (coldfusion.sql.DataSourcePermission)
 
hmm... it seems you don't have permissions

once you clear that up, you're going to discover that mysql doesn't support the same syntax as you've been using with Access or SQL Server

remove the doublequotes from the table name

SELECT * FROM staff

:)

r937.com | rudy.ca
Buy my new book Simply SQL from Amazon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top