Hi, I hope that someone can help me with the following problem with RODBC connection to a MySQL database I am running R version 2.2.0 on windows XP, and have the MySQL database registered in Windows ODBC. I have set up a web interface on my personal ISS web server using PhP to accept input values and then call Rterm with an R script to access the database and return a summary of the analysed data. This works perfectly if I run it from Rgui, or if I run Rterm from the dos prompt using the same command line arguments, but returns an RODBC error (below) when calling Rterm from the web interface 1: [RODBC] ERROR: state IM002, code 0, message [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified There appears to be some problem with recognising the database when called from the web page, even though it is not a problem at any other times. Does anyone have any suggestions as to what I can do to overcome this error Thanks for your help cheers Evan Sergeant AusVet Animal Health Services 69 Turner Cr, Orange NSW 2800 Australia Phone +61 2 6362 1598 Fax +61 2 6369 1473 Email: evan at ausvet.com.au Web site: http://www.ausvet.com.au MLA's Q Fever Register: www.qfever.org This transmission is for the intended addressee only and is confidential information. If you have received this transmission in error, please delete it and notify the sender. The contents of this email are the opinion of the writer only a
RODBC error
3 messages · Tom, Evan Sergeant
On Wed, 2005-02-11 at 07:55 +1000, Evan Sergeant wrote:
Hi, I hope that someone can help me with the following problem with RODBC connection to a MySQL database I am running R version 2.2.0 on windows XP, and have the MySQL database registered in Windows ODBC. I have set up a web interface on my personal ISS web server using PhP to accept input values and then call Rterm with an R script to access the database and return a summary of the analysed data. This works perfectly if I run it from Rgui, or if I run Rterm from the dos prompt using the same command line arguments, but returns an RODBC error (below) when calling Rterm from the web interface 1: [RODBC] ERROR: state IM002, code 0, message [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified There appears to be some problem with recognising the database when called from the web page, even though it is not a problem at any other times. Does anyone have any suggestions as to what I can do to overcome this error Thanks for your help cheers Evan Sergeant
Evan, It sounds like your problem is occuring when you try to access the database as a different user than yourself. Its been a while since I've been familiar with ms systems but IRC pws runs as its own user (ISUSR_...???). At the very least you will have to ensure that the datasource is registered as a system DSN not a user DSN. Appart from that you may run into other issues with access privileges. good luck tom
2 days later
Hi Tom, Thanks for this suggestion. It now works perfectly. You have been a great help Cheers Evan Sergeant
At 10:00 PM 02/11/2005, tom wright wrote:
On Wed, 2005-02-11 at 07:55 +1000, Evan Sergeant wrote:
Hi, I hope that someone can help me with the following problem with RODBC connection to a MySQL database I am running R version 2.2.0 on windows XP, and have the MySQL database registered in Windows ODBC. I have set up a web interface on my personal ISS web server using PhP to accept input values and then call Rterm with an R script to access the database and return a summary of the analysed data. This works perfectly if I run it from Rgui, or if I run Rterm from the dos prompt using the same command line arguments, but returns an RODBC error (below) when calling Rterm from the web interface 1: [RODBC] ERROR: state IM002, code 0, message [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified There appears to be some problem with recognising the database when called from the web page, even though it is not a problem at any other times. Does anyone have any suggestions as to what I can do to overcome this error Thanks for your help cheers Evan Sergeant
Evan, It sounds like your problem is occuring when you try to access the database as a different user than yourself. Its been a while since I've been familiar with ms systems but IRC pws runs as its own user (ISUSR_...???). At the very least you will have to ensure that the datasource is registered as a system DSN not a user DSN. Appart from that you may run into other issues with access privileges. good luck tom -- No virus found in this incoming message. Checked by AVG Anti-Virus. Version: 7.1.362 / Virus Database: 267.12.8/161 - Release Date: 03/11/2005
Evan Sergeant AusVet Animal Health Services 69 Turner Cr, Orange NSW 2800 Australia Phone +61 2 6362 1598 Fax +61 2 6369 1473 Email: evan at ausvet.com.au Web site: http://www.ausvet.com.au MLA's Q Fever Register: www.qfever.org This transmission is for the intended addressee only and is confidential information. If you have received this transmission in error, please delete it and notify the sender. The contents of this email are the opinion of the writer only and are not endorsed by AusVet Animal Health Services unless expressly stated otherwise. AusVet uses virus scanning software, but does not accept liability for viruses or other defects in any attachments. --