Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6082417
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T11:17:13+00:00 2026-05-23T11:17:13+00:00

Using R 2.13.0 with Window XP 32b, I am struglling with defining properly a

  • 0

Using R 2.13.0 with Window XP 32b,

I am struglling with defining properly a query that I’d like to build in R and send to sqlQuery from the RODBC package.

I have a problem with adding a filepath to the query.

following advices on how to deal with backslash in strings, here is the query that I can write but that lead to an error.

The following is running well in Access :

    SELECT Tamis_Lavage.* 
    FROM  Tamis_Lavage
    IN  "d:\Mes Documents\Pascal\03 - BiomFix\99 - Suivi Etude\01 - Donnees\Données STH\Test_Import\Copie de 20110623Acquisition.mdb"

is working fine in access.

its translation :

>   MyQuery <- paste(" 
+    SELECT Tamis_Lavage.* 
+    FROM Tamis_Lavage
+    IN \"d:\\Mes Documents\\Pascal\\03 - BiomFix\\99 - Suivi Etude\\01 - Donnees\\Données STH\\Test_Import\\Copie de 20110623Acquisition.mdb\" "
+     , sep="")
>   
>   tmp <- sqlQuery(con, query=MyQuery)
>   tmp       
[1] "42000 -1002 [Microsoft][Pilote ODBC Microsoft Access] Le moteur de base de données ne peut pas trouver '[d:\\Mes Documents\\Pascal\\03 - BiomFix\\99 - Suivi Etude\\01 - Donnees\\Données STH\\Test_Import\\Copie de 20110623Acquisition.mdb]'. Assurez-vous que le nom de paramètre ou d'alias est valide, qu'il ne comprend pas de caractère ou de ponctuation incorrect et qu'il n'est pas trop long."
[2] "[RODBC] ERROR: Could not SQLExecDirect ' SELECT Tamis_Lavage.* \n   FROM Tamis_Lavage\n   IN \"d:\\Mes Documents\\Pascal\\03 - BiomFix\\99 - Suivi Etude\\01 - Donnees\\Données STH\\Test_Import\\Copie de 20110623Acquisition.mdb\" '"                                                                                                                                                                  
>   MyQuery 
[1] " \n SELECT Tamis_Lavage.* \n   FROM Tamis_Lavage\n   IN \"d:\\Mes Documents\\Pascal\\03 - BiomFix\\99 - Suivi Etude\\01 - Donnees\\Données STH\\Test_Import\\Copie de 20110623Acquisition.mdb\" "

leads to an error.

Could you help in the translation process ?

Best regards
Pascal

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T11:17:14+00:00Added an answer on May 23, 2026 at 11:17 am

    Your MyQuery could be problematic because of the newlines \n that you introduced.

    Try the following:

    MyQuery <- paste(
        "SELECT Tamis_Lavage.*", 
        "FROM Tamis_Lavage",
        "IN 'd:\\Mes Documents\\Pascal\\03 - BiomFix\\99 - Suivi Etude\\01 - Donnees\\Données STH\\Test_Import\\Copie de 20110623Acquisition.mdb'")
    

    What is different?

    • None of the parameters to paste contains a \n.
    • I find it easier to use single quotes ' when working embedding quotes in strings. (This also has the benefit that you don’t have to escape the quotes.)
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using window.onload to call my JavaScript code that has to be executed after
I'm thinking of using window.postMessage directly for cross-domain communication. If I do: postMessage() from
I have a page that notifies the user about server updates, using window.webkitNotifications .
I would like to get process id and process name via using window title
I have an application that open's some dynamic popup either using window.open() or using
I am opening a popup window from javascript using window.open. I want to open
I need to communicate with C# application using Window messaging from Java application. From
I'm using window.onback = history.forward(); to prevent users from resubmitting data. I know it's
A popup window is opened using window.popup Is it possible send post data to
I am using Window.ShowDialog() method to fetch some values from the user. However, the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.