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);
}
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
|||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?
|||
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.
|||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.
No comments:
Post a Comment