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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Database connection to Oracle 1

Status
Not open for further replies.

evergrean100

Technical User
Dec 1, 2006
115
US
I am going to work with MX 7 on a Unix server and was wondering how I connect to the database where I wont have a DSN connection like the standard way:
Code:
<cfquery name="dbdata" datasource="mydsnName">
SELECT * FROM table
</cfquery>

How would the database connection look if this is the following info:
Code:
Host = myhostname:1234
Sid = myabc
Username = "jones"
Password = "baseball"

I know I cant do it this way and need help on it:
Code:
<cfquery name="dbdata" datasource="myhostname:1526:myabc", "jones", "baseball");">
SELECT * FROM table
</cfquery>

Thanks.
 
This should work for you:

Code:
<cfquery dbname="myabc" dbserver="myhostname:1234" username="jones" password="baseball" name="dbdata">
	SELECT *
	FROM table
</cfquery>

Hope this helps!

Tony
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top