locked
RDA unable to pull data RRS feed

  • Question

  • Hello -

    I am trying to pull data from SQL Server 2000 database onto my Pocket PC and the simple query works on Northwind sample database but does not on another custom build database.  I did test the statement in the SQL Query Analyzer and it works. 

    The error I get is: "Failure setting up a non parameterized query, possible incorrect SQL query."

    I know the code is right - thanks to Rory B's screenscasts.  Any guidance will be greatly appreciated!

    Thanks!

    Moldau

    Here is the code:

    private void RdaPull()

    {

    try

    {

    //Create the database

    if (File.Exists("\\My Documents\\Test.sdf"))

    File.Delete(\\My Documents\\Test.sdf);

    SqlCeEngine engine = new SqlCeEngine();

    engine.LocalConnectionString = localConnection;

    engine.CreateDatabase();

    engine.Dispose();

    //Initialize RDA Object

    SqlCeRemoteDataAccess rda = null;

    rda = new SqlCeRemoteDataAccess(rdaUrl, localConnection);

    rda.Pull ("Customers", "select * from Customers", rdaOleDbConnectionString);

    rda.Dispose();

    MessageBox.Show("Done");

    }

    catch (SqlCeException ex)

    {

    MessageBox.Show(ex.Message);

    }

     

    Thursday, November 2, 2006 2:22 PM

Answers

  • From the sample code you have dumped, I dont see any issue.  Can you please elaborate on what are all the configurations you have at IIS, SQL Server, Device so that we know the environment.  This is a very basic operation and it should not fail.  It worries me hearing that a basic scenario like this fails in your case!

    Please provider as much detail as you can so that we have a good understanding of the problem environment.

    Thanks,

    Laxmi

    Saturday, November 11, 2006 7:13 PM

All replies

  • From the sample code you have dumped, I dont see any issue.  Can you please elaborate on what are all the configurations you have at IIS, SQL Server, Device so that we know the environment.  This is a very basic operation and it should not fail.  It worries me hearing that a basic scenario like this fails in your case!

    Please provider as much detail as you can so that we have a good understanding of the problem environment.

    Thanks,

    Laxmi

    Saturday, November 11, 2006 7:13 PM
  • I am facing the same issue.  I have several published examples of RDA and have followed them exactly.  As soon as the Pull method is called I receive the error:

    28622 Internal Error:  Failure setting up a non parameterized query, possible incorrect SQL query.

    Has anyone discovered what may be causing this?

    Wednesday, November 22, 2006 7:41 PM
  •  

    Hi

    I had exactly the same error

    Failure setting up a non parameterized query, possible incorrect SQL query.

    this error was caused by a mistake in my SQL query. i hope this will help some of you!

    Reguards.

    Wednesday, January 24, 2007 10:13 AM
  • Check your sqlcesa30.log file from browser.

    In my case it was :

    2007/04/08 00:09:31 Thread=1398 RSCB=36 Command=PULL Hr=80040E09 SELECT permission denied on object 'Stolik', database 'rms', schema 'dbo'. 229

    I changed my anonymous user permissions and everything works fine now.

    Saturday, April 7, 2007 10:26 PM
  • The sqlcesa30.log file will contain the proper root cause of the problem.

     

    Thursday, June 12, 2008 6:00 AM
  • Hi,

     

        Did you try running the same query in SSMS against the SQL Server. I am guessing that it could be due to case sensitivity (or subtle naming of tables) issues in SQL Server. Please let me know, if SSMS reports success? Even though the client side does not need Case sensitivity in table/column names, when referring to SQL Server tables/columns, case should be obeyed if SQL Database is case sensitive.

     

    Thanks

    Udaya

    Wednesday, July 2, 2008 2:59 PM