[R] RODBC problem

2007-07-06 Thread Bernhard Wellhöfer
Hello,
 
I use a RODBC connection to a MySQL server on a Debian machine. The call to 
odbcConnect() seems to be ok, but the result of the first 
sqlFetch(channel,t_studie) retrieves this data frame:
 
[1] [RODBC] ERROR: Could not SQLExecDirect
[2] 42000 1064 [MySQL][ODBC 3.51 Driver][mysqld-5.0.22-Debian_1bpo1-log]You 
have an error in your SQL syntax; check the manual that corresponds to your 
MySQL server version for the right syntax to use near '\t_studi(\004

Please note the funny character at the end of the table name in the error 
message.
 
The Test Data Source option on the ODBC Data Source Name configuration panel 
report success.
 
Who can help me here?
 
Regards,
 
Bernhard
 
 
 
 
 

[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] RODBC problem

2007-07-06 Thread DUPREZ Cédric
Hello,

The problem seems to be in the query syntax.
Can you show us the query you are trying to perform ?

Regards,

Cedric

-Message d'origine-
De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] De la part de Bernhard 
Wellhöfer
Envoyé : vendredi 6 juillet 2007 11:45
À : r-help@stat.math.ethz.ch
Objet : [R] RODBC problem

Hello,
 
I use a RODBC connection to a MySQL server on a Debian machine. The call to 
odbcConnect() seems to be ok, but the result of the first 
sqlFetch(channel,t_studie) retrieves this data frame:
 
[1] [RODBC] ERROR: Could not SQLExecDirect
[2] 42000 1064 [MySQL][ODBC 3.51 Driver][mysqld-5.0.22-Debian_1bpo1-log]You 
have an error in your SQL syntax; check the manual that corresponds to your 
MySQL server version for the right syntax to use near '\t_studi(\004

Please note the funny character at the end of the table name in the error 
message.
 
The Test Data Source option on the ODBC Data Source Name configuration panel 
report success.
 
Who can help me here?
 
Regards,
 
Bernhard
 
 
 
 
 

[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] RODBC problem

2007-07-06 Thread Bernhard Wellhöfer
Hello,

as I wrote I call

  sqlFetch(channel,t_studie)

and this function generates in the background the concrete query. How can I 
view/log/... the concrete query?

Regards,

Bernhard 

 -Original Message-
 From: DUPREZ Cédric [mailto:[EMAIL PROTECTED] 
 Sent: Friday, July 06, 2007 11:59 AM
 To: Bernhard Wellhöfer
 Cc: r-help@stat.math.ethz.ch
 Subject: RE: [R] RODBC problem
 
 Hello,
 
 The problem seems to be in the query syntax.
 Can you show us the query you are trying to perform ?
 
 Regards,
 
 Cedric
 
 -Message d'origine-
 De : [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] De la part de 
 Bernhard Wellhöfer
 Envoyé : vendredi 6 juillet 2007 11:45
 À : r-help@stat.math.ethz.ch
 Objet : [R] RODBC problem
 
 Hello,
  
 I use a RODBC connection to a MySQL server on a Debian 
 machine. The call to odbcConnect() seems to be ok, but the 
 result of the first sqlFetch(channel,t_studie) retrieves 
 this data frame:
  
 [1] [RODBC] ERROR: Could not SQLExecDirect
 [2] 42000 1064 [MySQL][ODBC 3.51 
 Driver][mysqld-5.0.22-Debian_1bpo1-log]You have an error in 
 your SQL syntax; check the manual that corresponds to your 
 MySQL server version for the right syntax to use near '\t_studi(\004
 
 Please note the funny character at the end of the table name 
 in the error message.
  
 The Test Data Source option on the ODBC Data Source Name 
 configuration panel report success.
  
 Who can help me here?
  
 Regards,
  
 Bernhard
  
  
  
  
  
 
   [[alternative HTML version deleted]]
 
 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide 
 http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.
 
 


__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] RODBC Problem

2006-11-17 Thread Sumanta Basak
Hi All,

 

I'm using Microsoft Office 2007 Beta version and I have
one file in .xlsx format with size 168MB. How can I use odbcConnectExcel
in this as this function only supports .xls format? I have huge data
containing 603470 rows in a .csv file. Thanks in advance.

 

 

 

  

Sumanta Basak.

 

THIS COMMUNICATION DOES NOT CONSTITUTE INVESTMENT ADVICE OR COUNSEL OR
SOLICITATION FOR INVESTMENT IN ANY SECURITY.

 


[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] RODBC problem

2006-10-20 Thread Wensui Liu
In a mdb table, I have a text field with values of 1, 2,  When I
use rodbc to read it into R, it becomes numeric. Is it a bug or
something?

Thanks.

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] RODBC problem

2006-10-20 Thread Jerome Asselin
On Fri, 2006-10-20 at 10:25 -0400, Wensui Liu wrote:
 In a mdb table, I have a text field with values of 1, 2,  When I
 use rodbc to read it into R, it becomes numeric. Is it a bug or
 something?

I don't think it's a bug. This behavior is documented.

See ?sqlQuery. Try the as.is=T argument.

Jerome

-- 
Jerome Asselin, M.Sc., Agent de recherche, RHCE
CHUM -- Centre de recherche
3875 rue St-Urbain, 3e etage // Montreal QC  H2W 1V1
Tel.: 514-890-8000 Poste 15914; Fax: 514-412-7106

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] RODBC: problem saving a new table in an Excel database

2003-07-21 Thread David Khabie-Zeitoune
Hi

I am using package RODBC version 1.0-1 under R version 1.7.1 on Windows
XP Pro. I am having problems writing a new table to an (Excel) database
using sqlSave.

I connect to an empty Excel spreadsheet using odbcConnectExcel (which, I
believe, uses the Microsoft Excel Driver DSN). Then I try and save a new
table to the database(spreadsheet) using SqlSave, but obtain an error
message. 

Below is some test code which reproduces the error (assuming that
c:\test.xls is a standard blank Excel spreadsheet; i.e. Sheet1,
Sheet2, Sheet3)

 con = odbcConnectExcel(c:\\test.xls)
 df = data.frame(x = rnorm(10), y = rnorm(10), z = letters[1:10])
 sqlSave(con, df)
Error in sqlSave(con, df) : [RODBC] ERROR: Could not SQLExecute

Where am I going wrong?

Thanks,

Dave

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] RODBC: problem saving a new table in an Excel database

2003-07-21 Thread Prof Brian Ripley
The driver does not support writing to Excel: did you check?

On Mon, 21 Jul 2003, David Khabie-Zeitoune wrote:

 Hi
 
 I am using package RODBC version 1.0-1 under R version 1.7.1 on Windows
 XP Pro. I am having problems writing a new table to an (Excel) database
 using sqlSave.
 
 I connect to an empty Excel spreadsheet using odbcConnectExcel (which, I
 believe, uses the Microsoft Excel Driver DSN). Then I try and save a new
 table to the database(spreadsheet) using SqlSave, but obtain an error
 message. 
 
 Below is some test code which reproduces the error (assuming that
 c:\test.xls is a standard blank Excel spreadsheet; i.e. Sheet1,
 Sheet2, Sheet3)
 
  con = odbcConnectExcel(c:\\test.xls)
  df = data.frame(x = rnorm(10), y = rnorm(10), z = letters[1:10])
  sqlSave(con, df)
 Error in sqlSave(con, df) : [RODBC] ERROR: Could not SQLExecute
 
 Where am I going wrong?
 
 Thanks,
 
 Dave
 
 __
 [EMAIL PROTECTED] mailing list
 https://www.stat.math.ethz.ch/mailman/listinfo/r-help
 

-- 
Brian D. Ripley,  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help