Hi.
I am trying to get RDA running. I have a Pocket PC with Sql Server Ce. I
have a desktop with Sql Server Express and IIS. I have configured
conectivity support in IIS , created a virtual directory in IIS with
sscesa20.dll. The Pocket PC is connected to another desktop through it´s
cradle (RS232) and ActiveSync 3.7.
When I send http://ComtuterName/VirtualDirName/sscesa20.dll from the device,
I get the expected response, so I believe this part is working.

I think my problem lies in the Access/Security part of the SqlServer. I am
(or at least I think I am) using Integrated Windows Authentication. But in
fact, I am rather insecure about all this authentication/sequrity business
which is, as it seems to me, a major topic in itself.

In my program on the Pocket PC, I recreate the databvase and then I try to
use the SqlCeRemoteDataAccess object to pull a table from the desktop
database. This is where my program fails. I get error messages like
80004005/minor error 28574, or 80040150/28574, or 80070057/28011. Where can
I find explanations for this? Please give me some advice on how to proceed
from here!

Regards,
Gudni

RE: RDA problems - please help by Marilyn

Marilyn
Tue Feb 27 20:01:28 CST 2007

Hi,

Try and see if the following link will help:

http://msdn2.microsoft.com/en-us/library/aa454892.aspx

Marilyn

"Gudni G. Sigurdsson" wrote:

> Hi.
> I am trying to get RDA running. I have a Pocket PC with Sql Server Ce. I
> have a desktop with Sql Server Express and IIS. I have configured
> conectivity support in IIS , created a virtual directory in IIS with
> sscesa20.dll. The Pocket PC is connected to another desktop through it´s
> cradle (RS232) and ActiveSync 3.7.
> When I send http://ComtuterName/VirtualDirName/sscesa20.dll from the device,
> I get the expected response, so I believe this part is working.
>
> I think my problem lies in the Access/Security part of the SqlServer. I am
> (or at least I think I am) using Integrated Windows Authentication. But in
> fact, I am rather insecure about all this authentication/sequrity business
> which is, as it seems to me, a major topic in itself.
>
> In my program on the Pocket PC, I recreate the databvase and then I try to
> use the SqlCeRemoteDataAccess object to pull a table from the desktop
> database. This is where my program fails. I get error messages like
> 80004005/minor error 28574, or 80040150/28574, or 80070057/28011. Where can
> I find explanations for this? Please give me some advice on how to proceed
> from here!
>
> Regards,
> Gudni

RE: RDA problems - please help by GudniGSigurdsson

GudniGSigurdsson
Wed Feb 28 14:25:02 CST 2007

Hi Marilyn and thank you for your comment.
The article you mention is certainly interesting. I sure am going to spend
some time with it. When it comes to the question of synchronizing data
between SQL Server 2005 and SQL Server Ce though, I was going to use RDA
rather than Merge Replication because I thought the former method was
simpler. Do you know of some good article about RDA? I have the impression
that my test are almost (!)working. I believe the problem is somehow
connected with SQL Server (and maybe also IIS) authorization and/or sequrity
questions.

Regards,
Gudni


"Marilyn" wrote:

> Hi,
>
> Try and see if the following link will help:
>
> http://msdn2.microsoft.com/en-us/library/aa454892.aspx
>
> Marilyn
>
> "Gudni G. Sigurdsson" wrote:
>
> > Hi.
> > I am trying to get RDA running. I have a Pocket PC with Sql Server Ce. I
> > have a desktop with Sql Server Express and IIS. I have configured
> > conectivity support in IIS , created a virtual directory in IIS with
> > sscesa20.dll. The Pocket PC is connected to another desktop through it´s
> > cradle (RS232) and ActiveSync 3.7.
> > When I send http://ComtuterName/VirtualDirName/sscesa20.dll from the device,
> > I get the expected response, so I believe this part is working.
> >
> > I think my problem lies in the Access/Security part of the SqlServer. I am
> > (or at least I think I am) using Integrated Windows Authentication. But in
> > fact, I am rather insecure about all this authentication/sequrity business
> > which is, as it seems to me, a major topic in itself.
> >
> > In my program on the Pocket PC, I recreate the databvase and then I try to
> > use the SqlCeRemoteDataAccess object to pull a table from the desktop
> > database. This is where my program fails. I get error messages like
> > 80004005/minor error 28574, or 80040150/28574, or 80070057/28011. Where can
> > I find explanations for this? Please give me some advice on how to proceed
> > from here!
> >
> > Regards,
> > Gudni

RE: RDA problems - please help by GudniGSigurdsson

GudniGSigurdsson
Thu Mar 15 11:49:20 CDT 2007

Hi Dough.

This is my code where I set up the connection and then try to pull a table:

// The database file.
private string strDBFile = @"MyDocuments\AdvstAflestur.sdf";

// The local connection string.
private string strConnLocal =
"Data Source=" + @"My Documents\AdvstAflestur.sdf";

// The remote connection string.
private string strConnRemote = "Provider=SqlOleDb; " +
"Data Source=Gardar\\Sqlexpress; " +
"Initial Catalog=AdvstAflestur; " +
"Integrated Security = True;";

// The URL
private string strURL = "http://Gardar/AdveitaDataSync/sscesa20.dll";


And the Pull operation:

private void mitemPull_Click(object sender, EventArgs e)
{
// Create a remote data access object
SqlCeRemoteDataAccess rdaNW =
new SqlCeRemoteDataAccess(strURL, strConnLocal);
try
{
rdaNW.LocalConnectionString = strConnLocal;
rdaNW.InternetUrl = strURL;
rdaNW.InternetLogin = "";
rdaNW.InternetPassword = "";
rdaNW.Pull("Visits",
"SELECT vNr, sNr, Dags, Timi, Lesari FROM Visits",
strConnRemote, RdaTrackOption.TrackingOnWithIndexes,
"ErrorCategories");
}
catch( SqlCeException exSQL )
{
//HandleSQLException(exSQL);
ShowErrors(exSQL);
}
finally
{
rdaNW.Dispose();
}
etc.

I get the message:

Error Code: 80070057
Autentication failed on the computer running IIS
Minor Err.: 28011

Thank you for looking into my problem, Dough.

Regards,
Gudni

"Doug" wrote:

> Hi Gudni.
>
> It might help us figure out where your program is going wrong if you post your code. I use something like this to create a database on the moblie device, connect to the SQL server and pull data down to the device:
>
> Dim rda As SqlCeRemoteDataAccess = Nothing
> Dim strSQL As String
>
> 'Create a new database
> Dim sqlEngine As New SqlCeEngine("Data Source=\My Documents\YourMobileDBName.sdf")
>
> sqlEngine.CreateDatabase()
>
> 'Connect to SQL 2000
> Dim rdaOleDbConnectString As String = "Provider=sqloledb; Data Source=DBServerName;InitialCatalog=DBName;User Id=DBUser;Password=DBUserPassword
>
> 'create an RDA object to connect to the SQL Server CE database on the mobile device:
> ' Initialize the RDA object.
> Try
> rda = New SqlCeRemoteDataAccess
>
> rda.InternetUrl = http://192.168.1.88/sqlce/sscesa20.dll
> rda.LocalConnectionString = "Provider=Microsoft.SQLSERVER." & _
> "OLEDB.CE.2.0;Data Source=\My Documents\YourMobileDBName.sdf"
> rda.InternetLogin = IISLogin
> rda.InternetPassword = IISPassword
>
> 'Pull from SQL 2000
> strSQL = "SELECT logon, password from users with (nolock) "
> rda.Pull("Users", strSQL, rdaOleDbConnectString, _
> RdaTrackOption.TrackingOff)
>
> Catch err As SqlCeException
> MsgBox(oUtility.ComposeSqlErrorMessage(err))
> '//If any error occurs then clear the database
> End Try
>
>
> EggHeadCafe.com - .NET Developer Portal of Choice
> http://www.eggheadcafe.com
>

RE: RDA problems - please help by GudniGSigurdsson

GudniGSigurdsson
Fri Mar 16 06:05:00 CDT 2007

Hi Doug.

After I replied yesterday to your message, I did experiment further with my
RDA test program. On the server, I had used Anonymous Access for the IIS
virtual directory with user IUSER_GARDAR (i.e. IUSER_ComputerName). As it
turned out, this user did not have authorisation to access the SqlServer
database. After I changed the user, I could pull and push data between the
mobile device and the server. My simple code example was therefore OK. I
find Microsoft security questions among the hardest to understand let alone
to master. Anyway, thank you for your contribution.

Regards,
Gudni

"Doug" wrote:

> Hi Gudni.
>
> It might help us figure out where your program is going wrong if you post your code. I use something like this to create a database on the moblie device, connect to the SQL server and pull data down to the device:
>
> Dim rda As SqlCeRemoteDataAccess = Nothing
> Dim strSQL As String
>
> 'Create a new database
> Dim sqlEngine As New SqlCeEngine("Data Source=\My Documents\YourMobileDBName.sdf")
>
> sqlEngine.CreateDatabase()
>
> 'Connect to SQL 2000
> Dim rdaOleDbConnectString As String = "Provider=sqloledb; Data Source=DBServerName;InitialCatalog=DBName;User Id=DBUser;Password=DBUserPassword
>
> 'create an RDA object to connect to the SQL Server CE database on the mobile device:
> ' Initialize the RDA object.
> Try
> rda = New SqlCeRemoteDataAccess
>
> rda.InternetUrl = http://192.168.1.88/sqlce/sscesa20.dll
> rda.LocalConnectionString = "Provider=Microsoft.SQLSERVER." & _
> "OLEDB.CE.2.0;Data Source=\My Documents\YourMobileDBName.sdf"
> rda.InternetLogin = IISLogin
> rda.InternetPassword = IISPassword
>
> 'Pull from SQL 2000
> strSQL = "SELECT logon, password from users with (nolock) "
> rda.Pull("Users", strSQL, rdaOleDbConnectString, _
> RdaTrackOption.TrackingOff)
>
> Catch err As SqlCeException
> MsgBox(oUtility.ComposeSqlErrorMessage(err))
> '//If any error occurs then clear the database
> End Try
>
>
> EggHeadCafe.com - .NET Developer Portal of Choice
> http://www.eggheadcafe.com
>