Showing posts with label push. Show all posts
Showing posts with label push. Show all posts

Friday, March 30, 2012

Problem with SqlCeRemoteDataAccess.Pull() in Pocket PC 2003 application

hi
I am trying to make a Pocket PC 2003 application which will pull data from a SQL Server 2005 database and store in Mobile database. and Push the table from mobile databse to SQL server 2005 database

I also have a desktop application up and running with SQL server database in which I can enter records to the SQL server 2005 database

I get error when I trigger SqlCeRemoteDataAccess.Pull() method, which says "sql mobile encountered problems when opening the database", (its native error 28559)

when user access the database as anoymous they'll log in as my account
I am working on Windows Vista and have IIS and SQL Server 2005 running on the same machine same machine alongside Visual Studio SP1 for vista
I've also got Windows Mobile Device Centre installed with Virtual PC 2007 Installer which means when I cradle the emulator the Windows Mobile Device Centre detects and connects it and I can internet on that.
but I can't access http://IDVISTA/SQLCE/sqlcesa30.dll (HostURL in the code) in Pocket PC 2003 emulator's Internet explorer (not sure if it counts)

below is my code

Code Snippet

private String LocalConString = "Data Source=Program Files\\PDADairy\\Database\\diary.sdf;Persist Security Info=False;";

private String RemoteConString = "Data Source=IDVISTA;Initial Catalog=Dairy;Integrated Security=SSPI;";


private String HostURL = "http://IDVISTA/SQLCE/sqlcesa30.dll";




public void Pull()
{

// Create a remote data access object

SqlCeRemoteDataAccess RDA = new SqlCeRemoteDataAccess(HostURL, "", "", LocalConString);

try
{
RDA.Pull("Appointments", "SELECT * FROM Appointments ", RemoteConString, RdaTrackOption.TrackingOff, "ErrorPullingAppointments");
}
catch (SqlCeException sqle)
{
for (int i = 0; i < sqle.Errors.Count; i++)
MessageBox.Show(sqle.Errors[i].NativeError.ToString() + "\n" +
sqle.Errors[i].Source);
}
finally
{
RDA.Dispose();

}





Any help will be much appreciated
Thanks
hi
I am trying to make a Pocket PC 2003 application which will pull data from a SQL Server 2005 database and store in Mobile database. and Push the table from mobile databse to SQL server 2005 database

I also have a desktop application up and running with SQL server database in which I can enter records to the SQL server 2005 database

I get error when I trigger SqlCeRemoteDataAccess.Pull() method, which says "sql mobile encountered problems when opening the database", (its native error 28559)

when user access the database as anoymous they'll log in as my account
I am working on Windows Vista and have IIS and SQL Server 2005 running on the same machine same machine alongside Visual Studio SP1 for vista
I've also got Windows Mobile Device Centre installed with Virtual PC 2007 Installer which means when I cradle the emulator the Windows Mobile Device Centre detects and connects it and I can internet on that.
but I can't access http://IDVISTA/SQLCE/sqlcesa30.dll (HostURL in the code) in Pocket PC 2003 emulator's Internet explorer (not sure if it counts)

below is my code

Code Snippet

private String LocalConString = "Data Source=Program Files\\PDADairy\\Database\\diary.sdf;Persist Security Info=False;";

private String RemoteConString = "Data Source=IDVISTA;Initial Catalog=Dairy;Integrated Security=SSPI;";


private String HostURL = "http://IDVISTA/SQLCE/sqlcesa30.dll";




public void Pull()
{

// Create a remote data access object

SqlCeRemoteDataAccess RDA = new SqlCeRemoteDataAccess(HostURL, "", "", LocalConString);

try
{
RDA.Pull("Appointments", "SELECT * FROM Appointments ", RemoteConString, RdaTrackOption.TrackingOff, "ErrorPullingAppointments");
}
catch (SqlCeException sqle)
{
for (int i = 0; i < sqle.Errors.Count; i++)
MessageBox.Show(sqle.Errors[i].NativeError.ToString() + "\n" +
sqle.Errors[i].Source);
}
finally
{
RDA.Dispose();

}





Any help will be much appreciated
Thanks

|||

It is vital that you can access the SQL CE agent URL from IE on your device. Try using the IP address of your PC instead of host name. Also, change your connection string to:

"Data Source=\\Program Files\\PDADairy\\Database\\diary.sdf;Persist Security Info=False;";

Try connecting with SQL security instead of integrated security, to see if this is the issue.

Also, there may be problems related to Vista and integrated security, see this:

http://blogs.msdn.com/stevelasker/archive/2007/06/16/using-rda-with-integrated-authentication.aspx

|||

Thanks for the quick reply

I have now managed to access SQL CE agent URL from emulator's IE. (it was my windows firewall blocking incoming requests)

but the problem is still the same I still get the same error even after changing the connection string as you suggested

OK i gotta admit that I am fairly new to this whole thing and dont really know how to connect with sql security (could you specify a bit for me please)

i m reading the blog now, see if there is anything I am missing still out

Cheers

|||

still stuck

tried the idea in the blog too Smile

need more help|||

You must specify a provider in your Remote connection string like this;

Provider=sqloledb;Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;

see http://www.connectionstrings.com/?carrier=sqlserver for more samples.

|||tried that too
still no avail

when it executes the pull(), in the output it says

A first chance exception of type 'System.Data.SqlServerCe.SqlCeException' occurred in System.Data.SqlServerCe.dll

any clues?

Problem with SqlCeRemoteDataAccess.Pull() in Pocket PC 2003 application

hi
I am trying to make a Pocket PC 2003 application which will pull data from a SQL Server 2005 database and store in Mobile database. and Push the table from mobile databse to SQL server 2005 database

I also have a desktop application up and running with SQL server database in which I can enter records to the SQL server 2005 database

I get error when I trigger SqlCeRemoteDataAccess.Pull() method, which says "sql mobile encountered problems when opening the database", (its native error 28559)

when user access the database as anoymous they'll log in as my account
I am working on Windows Vista and have IIS and SQL Server 2005 running on the same machine same machine alongside Visual Studio SP1 for vista
I've also got Windows Mobile Device Centre installed with Virtual PC 2007 Installer which means when I cradle the emulator the Windows Mobile Device Centre detects and connects it and I can internet on that.
but I can't access http://IDVISTA/SQLCE/sqlcesa30.dll (HostURL in the code) in Pocket PC 2003 emulator's Internet explorer (not sure if it counts)

below is my code

Code Snippet

private String LocalConString = "Data Source=Program Files\\PDADairy\\Database\\diary.sdf;Persist Security Info=False;";

private String RemoteConString = "Data Source=IDVISTA;Initial Catalog=Dairy;Integrated Security=SSPI;";


private String HostURL = "http://IDVISTA/SQLCE/sqlcesa30.dll";




public void Pull()
{

// Create a remote data access object

SqlCeRemoteDataAccess RDA = new SqlCeRemoteDataAccess(HostURL, "", "", LocalConString);

try
{
RDA.Pull("Appointments", "SELECT * FROM Appointments ", RemoteConString, RdaTrackOption.TrackingOff, "ErrorPullingAppointments");
}
catch (SqlCeException sqle)
{
for (int i = 0; i < sqle.Errors.Count; i++)
MessageBox.Show(sqle.Errors[i].NativeError.ToString() + "\n" +
sqle.Errors[i].Source);
}
finally
{
RDA.Dispose();

}





Any help will be much appreciated
Thanks
hi
I am trying to make a Pocket PC 2003 application which will pull data from a SQL Server 2005 database and store in Mobile database. and Push the table from mobile databse to SQL server 2005 database

I also have a desktop application up and running with SQL server database in which I can enter records to the SQL server 2005 database

I get error when I trigger SqlCeRemoteDataAccess.Pull() method, which says "sql mobile encountered problems when opening the database", (its native error 28559)

when user access the database as anoymous they'll log in as my account
I am working on Windows Vista and have IIS and SQL Server 2005 running on the same machine same machine alongside Visual Studio SP1 for vista
I've also got Windows Mobile Device Centre installed with Virtual PC 2007 Installer which means when I cradle the emulator the Windows Mobile Device Centre detects and connects it and I can internet on that.
but I can't access http://IDVISTA/SQLCE/sqlcesa30.dll (HostURL in the code) in Pocket PC 2003 emulator's Internet explorer (not sure if it counts)

below is my code

Code Snippet

private String LocalConString = "Data Source=Program Files\\PDADairy\\Database\\diary.sdf;Persist Security Info=False;";

private String RemoteConString = "Data Source=IDVISTA;Initial Catalog=Dairy;Integrated Security=SSPI;";


private String HostURL = "http://IDVISTA/SQLCE/sqlcesa30.dll";




public void Pull()
{

// Create a remote data access object

SqlCeRemoteDataAccess RDA = new SqlCeRemoteDataAccess(HostURL, "", "", LocalConString);

try
{
RDA.Pull("Appointments", "SELECT * FROM Appointments ", RemoteConString, RdaTrackOption.TrackingOff, "ErrorPullingAppointments");
}
catch (SqlCeException sqle)
{
for (int i = 0; i < sqle.Errors.Count; i++)
MessageBox.Show(sqle.Errors[i].NativeError.ToString() + "\n" +
sqle.Errors[i].Source);
}
finally
{
RDA.Dispose();

}





Any help will be much appreciated
Thanks

|||

It is vital that you can access the SQL CE agent URL from IE on your device. Try using the IP address of your PC instead of host name. Also, change your connection string to:

"Data Source=\\Program Files\\PDADairy\\Database\\diary.sdf;Persist Security Info=False;";

Try connecting with SQL security instead of integrated security, to see if this is the issue.

Also, there may be problems related to Vista and integrated security, see this:

http://blogs.msdn.com/stevelasker/archive/2007/06/16/using-rda-with-integrated-authentication.aspx

|||

Thanks for the quick reply

I have now managed to access SQL CE agent URL from emulator's IE. (it was my windows firewall blocking incoming requests)

but the problem is still the same I still get the same error even after changing the connection string as you suggested

OK i gotta admit that I am fairly new to this whole thing and dont really know how to connect with sql security (could you specify a bit for me please)

i m reading the blog now, see if there is anything I am missing still out

Cheers

|||

still stuck

tried the idea in the blog too Smile

need more help|||

You must specify a provider in your Remote connection string like this;

Provider=sqloledb;Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;

see http://www.connectionstrings.com/?carrier=sqlserver for more samples.

|||tried that too
still no avail

when it executes the pull(), in the output it says

A first chance exception of type 'System.Data.SqlServerCe.SqlCeException' occurred in System.Data.SqlServerCe.dll

any clues?

Problem with SqlCeRemoteDataAccess Pull

hi
I am trying to make a Pocket PC 2003 application which will pull data from a SQL Server 2005 database and store in Mobile database. and Push the table from mobile databse to SQL server 2005 database

I also have a desktop application up and running with SQL server database in which I can enter records to the SQL server 2005 database

I get error when I trigger SqlCeRemoteDataAccess.Pull() method, which says "sql mobile encountered problems when opening the database", (its native error 28559)

when user access the database as anoymous they'll log in as my account
I am working on Windows Vista and have IIS and SQL Server 2005 running on the same machine same machine alongside Visual Studio SP1 for vista
I've also got Windows Mobile Device Centre installed with Virtual PC 2007 Installer which means when I cradle the emulator the Windows Mobile Device Centre detects and connects it and I can internet on that.
but I can't access http://IDVISTA/SQLCE/sqlcesa30.dll (HostURL in the code) in Pocket PC 2003 emulator's Internet explorer (not sure if it counts)

below is my code

Code Snippet

private String LocalConString = "Data Source=Program Files\\PDADairy\\Database\\diary.sdf;Persist Security Info=False;";

private String RemoteConString = "Data Source=IDVISTA;Initial Catalog=Dairy;Integrated Security=SSPI;";


private String HostURL = "http://IDVISTA/SQLCE/sqlcesa30.dll";




public void Pull()
{

// Create a remote data access object

SqlCeRemoteDataAccess RDA = new SqlCeRemoteDataAccess(HostURL, "", "", LocalConString);

try
{
RDA.Pull("Appointments", "SELECT * FROM Appointments ", RemoteConString, RdaTrackOption.TrackingOff, "ErrorPullingAppointments");
}
catch (SqlCeException sqle)
{
for (int i = 0; i < sqle.Errors.Count; i++)
MessageBox.Show(sqle.Errors[i].NativeError.ToString() + "\n" +
sqle.Errors[i].Source);
}
finally
{
RDA.Dispose();

}





Any help will be much appreciated
Thanks
hi
I am trying to make a Pocket PC 2003 application which will pull data from a SQL Server 2005 database and store in Mobile database. and Push the table from mobile databse to SQL server 2005 database

I also have a desktop application up and running with SQL server database in which I can enter records to the SQL server 2005 database

I get error when I trigger SqlCeRemoteDataAccess.Pull() method, which says "sql mobile encountered problems when opening the database", (its native error 28559)

when user access the database as anoymous they'll log in as my account
I am working on Windows Vista and have IIS and SQL Server 2005 running on the same machine same machine alongside Visual Studio SP1 for vista
I've also got Windows Mobile Device Centre installed with Virtual PC 2007 Installer which means when I cradle the emulator the Windows Mobile Device Centre detects and connects it and I can internet on that.
but I can't access http://IDVISTA/SQLCE/sqlcesa30.dll (HostURL in the code) in Pocket PC 2003 emulator's Internet explorer (not sure if it counts)

below is my code

Code Snippet

private String LocalConString = "Data Source=Program Files\\PDADairy\\Database\\diary.sdf;Persist Security Info=False;";

private String RemoteConString = "Data Source=IDVISTA;Initial Catalog=Dairy;Integrated Security=SSPI;";


private String HostURL = "http://IDVISTA/SQLCE/sqlcesa30.dll";




public void Pull()
{

// Create a remote data access object

SqlCeRemoteDataAccess RDA = new SqlCeRemoteDataAccess(HostURL, "", "", LocalConString);

try
{
RDA.Pull("Appointments", "SELECT * FROM Appointments ", RemoteConString, RdaTrackOption.TrackingOff, "ErrorPullingAppointments");
}
catch (SqlCeException sqle)
{
for (int i = 0; i < sqle.Errors.Count; i++)
MessageBox.Show(sqle.Errors[i].NativeError.ToString() + "\n" +
sqle.Errors[i].Source);
}
finally
{
RDA.Dispose();

}





Any help will be much appreciated
Thanks

|||

It is vital that you can access the SQL CE agent URL from IE on your device. Try using the IP address of your PC instead of host name. Also, change your connection string to:

"Data Source=\\Program Files\\PDADairy\\Database\\diary.sdf;Persist Security Info=False;";

Try connecting with SQL security instead of integrated security, to see if this is the issue.

Also, there may be problems related to Vista and integrated security, see this:

http://blogs.msdn.com/stevelasker/archive/2007/06/16/using-rda-with-integrated-authentication.aspx

|||

Thanks for the quick reply

I have now managed to access SQL CE agent URL from emulator's IE. (it was my windows firewall blocking incoming requests)

but the problem is still the same I still get the same error even after changing the connection string as you suggested

OK i gotta admit that I am fairly new to this whole thing and dont really know how to connect with sql security (could you specify a bit for me please)

i m reading the blog now, see if there is anything I am missing still out

Cheers

|||

still stuck

tried the idea in the blog too Smile

need more help|||

You must specify a provider in your Remote connection string like this;

Provider=sqloledb;Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;

see http://www.connectionstrings.com/?carrier=sqlserver for more samples.

|||tried that too
still no avail

when it executes the pull(), in the output it says

A first chance exception of type 'System.Data.SqlServerCe.SqlCeException' occurred in System.Data.SqlServerCe.dll

any clues?

Saturday, February 25, 2012

Problem with push subscription where subscriber identified by IP not name

I have set up six push subscriptions of the same publication on a wide area
network successfully, but am having a problem with the seventh one. I think
the problem is due to the fact that the subscription was set up using the
subscribing server's IP address rather than network name (there is currently
a problem on the network so the server's name can't be resolved)
The error seen in the merge agent for the subscription is:
The subscription to publication 'PersonNameAddrUpdate' is invalid.
(Source: Merge Replication Provider (Agent); Error number: -2147201019)
------
The remote server is not defined as a subscription server.
(Source: xxx.xxx.xxx.xx (Data source); Error number: 14010)
------
(xxx.xxx.xxx.xx is the subscribing server's IP address)
Is there anything that can be done while we have this problem with the
network?
Try using the client network utility to map the subscriber's IP address to
its netbios name and then register that in Enterprise Manager and as a
subscriber.
HTH,
Paul Ibison
"Laurence Neville" <laurenceneville@.hotmail.com> wrote in message
news:%237O3GIeTFHA.2812@.TK2MSFTNGP09.phx.gbl...
>I have set up six push subscriptions of the same publication on a wide area
>network successfully, but am having a problem with the seventh one. I think
>the problem is due to the fact that the subscription was set up using the
>subscribing server's IP address rather than network name (there is
>currently a problem on the network so the server's name can't be resolved)
> The error seen in the merge agent for the subscription is:
> The subscription to publication 'PersonNameAddrUpdate' is invalid.
> (Source: Merge Replication Provider (Agent); Error number: -2147201019)
> ------
> The remote server is not defined as a subscription server.
> (Source: xxx.xxx.xxx.xx (Data source); Error number: 14010)
> ------
> (xxx.xxx.xxx.xx is the subscribing server's IP address)
> Is there anything that can be done while we have this problem with the
> network?
>
|||I figured it out with help from this page:
http://www.adminlife.com/247referenc...36/184432.aspx
The answer was:
The error can also occur if the subscriber is registered using a TCP/IP
address instead of a Name.(see 321822). To work around, use the client
utilities to create an ALIAS name to the subscribers TCP/IP address and then
use that ALIAS name when registering the subscriber instead of the TCP/IP
address.
"Laurence Neville" <laurenceneville@.hotmail.com> wrote in message
news:%237O3GIeTFHA.2812@.TK2MSFTNGP09.phx.gbl...
>I have set up six push subscriptions of the same publication on a wide area
>network successfully, but am having a problem with the seventh one. I think
>the problem is due to the fact that the subscription was set up using the
>subscribing server's IP address rather than network name (there is
>currently a problem on the network so the server's name can't be resolved)
> The error seen in the merge agent for the subscription is:
> The subscription to publication 'PersonNameAddrUpdate' is invalid.
> (Source: Merge Replication Provider (Agent); Error number: -2147201019)
> ------
> The remote server is not defined as a subscription server.
> (Source: xxx.xxx.xxx.xx (Data source); Error number: 14010)
> ------
> (xxx.xxx.xxx.xx is the subscribing server's IP address)
> Is there anything that can be done while we have this problem with the
> network?
>