Showing posts with label parameterized. Show all posts
Showing posts with label parameterized. Show all posts

Saturday, February 25, 2012

RDA pull error

When I try to do a pull I'm getting the following error message:

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

Now when I run this query in QA it works and returns me data. I'm also doing a pull on another table that works.

so I have this that works for one pull:

rda.Pull("Customers", 'select customerId, firstname, lastname, state, city from Customers", rdaConn, RdaTrackOption.TrackingOff);

and then I have this one that fails and gives me the above mentioned error:

rda.Pull("Sales", "select salesID, buyer, SaleDate from Sales', rdaConn, RdaTrackOption.TrackingOff);

and it fails.

another issue I'm having is, I can't run any rda.Pull() with RdaTrackOption.TrackingOn, any ideas on why I can't do that?

any help is greatly apprecated as for I've been going nuts on trying to figure this stuff out for the pass 2 weeks.

Anything to do with quotes? Your select starts with a double and ends in a single quote.|||

No, that was a typo when typing it in here. I should've just did a copy & paste in here.

RDA Error:Failure setting up a non parameterized query, possible incorrect SQL query

I receive this error :

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

any 1 can help me plz?

here is my code :

string strDBFile = DBPath;

string strConnLocal = DBConnection;

string strConnRemote = "Provider=sqloledb; "

+ "Data Source=AMNEH; "

+ "Initial Catalog=SIS; "

+ "Integrated Security=SSPI;";

string strURL = "http://" + ipAddress + "/" + virtualDirectory + "/sqlcesa30.dll";

SqlCeRemoteDataAccess rdaNW = new SqlCeRemoteDataAccess();

try

{

rdaNW.LocalConnectionString = strConnLocal;

rdaNW.InternetUrl = strURL;

rdaNW.InternetLogin = "";

rdaNW.InternetPassword = "";

string select = "select * from tabel1 where field1=326";

rdaNW.Pull("tabel1",select,

strConnRemote,

RdaTrackOption.TrackingOnWithIndexes,

"ErrorLog");

}

catch (SqlCeException exSQL)

{

MessageBox.Show("HRESULT:" + exSQL.HResult.ToString() + ",\nNativeError:" + exSQL.NativeError.ToString() + ",\nMessage:" + exSQL.Message);

}

finally

{

rdaNW.Dispose();

}

There is no obvious error with your select query but there are a number of things that can be setup incorrectly when doing RDA. Did you remove the table from the SQL CE database before running this code? I have answered dozens of questions in this forum and on microsoft.public.sqlserver.ce on the topic of troubleshooting RDA. You can use Google Advanced Group Search to search for the posts that apply to RDA.

Darren