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
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.
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 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.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.