Hi all,
I have following problem:
I'm developing a Windows Mobile application, which is using RDA Pull for retrieving data from SQL Server 2005 database to PDA. Please, see the example:
Code Snippet
using (SqlCeEngine engine = new SqlCeEngine(connStr))
{
engine.CreateDatabase();
}
serverConnStr="Provider=SQLOLEDB;Data Source=.;User ID=sa;Initial Catalog=Demo;Password=xxx";
using (SqlCeRemoteDataAccess rda = new SqlCeRemoteDataAccess(
Configuration.Default.SyncServerAddress, "", "", connStr))
{
rda.Pull("MyTable", "SELECT * FROM mytable", serverConnStr, RdaTrackOption.TrackingOffWithIndexes, "ErrorTable");
}
Everythink works fine, when I use 'sa' user account in serverConnStr.
But, when I change conn string to:
"Provider=SQLOLEDB;Data Source=.;User ID=test;Initial Catalog=Demo;Password=test"
the sqlcesa30.dll cannot connect to SQL Server database.
In the sqlcesa30.log then I found following line:
Code Snippet
2007/04/17 10:43:31 Thread=1EE30 RSCB=16 Command=PULL Hr=80040E4D Login failed for user 'test'. 18456
The user 'test' is member of db_owner, db_datareader and public roles for the Demo database and in SQL Server Management Studio I'm able to login to the Demo database with using the 'test' users credentials and I'm able to run the select command on 'mytable'.
So, what's wrong? Why the sqlcesa30.dll process cannot login to the Demo database, and from another application with using the SAME connection string it works?
Please help.
Thank you.
Fipil.
Is the test account in the PAL? It may also need to be in the dbo_role in the distribution database.|||I'm not using Replication, but RDA. So, there are no a publication created.
|||Moving to CE forum.|||I solved the problem.
The problem was in login name, I replaced 'g' by 'q' in login name, so this was all the problem :-).
|||Hi,Fipil
I met the same problem with u.
Glad that you have slove the problem :-)
But, I'm not clear what's your mean that "I replaced 'g' by 'q' in login name", Can you explain it detaily?
Thanks & Best Regards,
Hua wen gui
|||Hi,
I made a mistake: I simple put the 'q' character instead of 'g' character to user name field, in my application's login form (on PDA). And, because I implemented remembering of username, the mistake was repeated. Little 'q' is similar to little 'g', so I passed over the mistake :-) and searched for another error...
|||So, you did not connect the DB with Login "test" in your PDA program, right?
My problem is : I can connect the DB with the same connect string in VBA . But, I can not connect DB in PDA program().
meanwhile, I can access http://server/PDA/sscesa20.dll on PDA successfully.
It's a strange problem, any suggestion?
Thanks
|||Yes, you are right. I changed original name of user by 'test' while writting post here.
Did you mean DB on server or db on PDA?
|||The DB on server.
I'd like to pull data from DB Server to PDA with RDA.pull.
But, a error comes out with login error (I can connect the Server DB with the same connection string in VB)
I can not find out the problem.
I'm not sure If the problem on IIS or SQL Server?
Ps, my SQL Server is SQL Server 2005, I can view http://Server/PDA/sscesa20.dll correctly.
No comments:
Post a Comment