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

how can connect to data source found in another server 1

Status
Not open for further replies.

romario

Programmer
Mar 15, 2004
11
US
Hi all
I put files cfm on server but the data source which the files connect on it found in another server.
and when I went to cfm administrator on ODBC and wrote the name of DS and server name the result was connection failed
million of thanks for any help
 
Hi Romario,

The solution depends on what kind of database you are attempting to connect to. If it's Sql Server, Oracle, Informix, or another database server, the solution is simple. If you are trying to connect to a stand alone database such as Access or Foxpro, it can be done but isn't as pretty.

GJ
 
Thanks for help
The Database is SQlServer
I hope the solution is very simple
please if you have answer give me with details
and alot of thanks for you
 
Hey Romario,

In this case, you'll be using the sql server odbc driver which is designed to work across a network so it's pretty simple. As datasources are specific to a machine, it doesn't matter what the datasource is on the other machine, you will create a new one on your CF server which points to the sql server. You can look at the other machines datasource and copy most of the information which will make it easy.

To create the datasource, go to the odbc setup in the CF admin and create a new datasource. You will need to select "Microsoft SQL Server Driver" from the ODBC driver drop down box. On the datasource setup page, click the "cf settings" button to show all of the options. At this point, you will need to enter the Sql server's name, IP, or domain name in the "server" field. You should put the database name you intend to use in the "database" field although this is not always required. You will then need to enter a username and password that has access to the sql server in the appropriate fields. You should be able to get all of this info from the other server's datasource with the exception of the password. You may need to contact the sql server admin if you don't know it.

Once you enter all of the info, the datasource should work. The only potential problem you might have is that sometimes you have to switch the odbc driver from named pipes to tcp/ip in the odbc manager if it doesn't want to connect. Hopefully you won't have to do this though.

Good luck,
GJ
 
Could you describe how to connect to a Access Database? I am having trouble connecting to the database on another server.

Thanks
Ryan
 
Good One GJ, you forgot one important point though, the server that your CF resides on that connects to the SQL database MAY need to have the CF services set-up to log in as a user account with the authority to access the SQL database. This will all depend on how the DB is set up and what kind of authentication you are using. If this is the case my reccomendation would be to set up an account that has Administrative access to the SQL database, then you would go into the control panel on your machine with the CF Server installed and go to services and configure your CF services to log in as that user account. **Important** the password although filled in is NOT present, you must enter the proper password. Make sure to STOP the services Before you do this, and RESTART them after. You must do ALL of the CF Services.

I hope that this assists you and if you have any further problems with the above configuration, just post your questions.

Good Luck,

SteelDragon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top