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!

Connect to database on different website

Status
Not open for further replies.

hpvic03

Technical User
Aug 2, 2006
89
0
0
Hello all,

I'm trying to write a script that can sync my database on my website with one hosted on another server. I have all the necessary login information for both databases and severs, but what is the method I would use to connect and do queries on the outside database?

Thanks in advance for your help!
 
First, you would go to the cf admin and create the datasource for the other server,

Then

i would define a variable in application.cfm

<cfset application.secondDB = 'blahDB'>

Finally,

<cfquery ..... datasource="#application.secondDB#">
....
</cfquery>

hope it helps

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top