Showing posts with label synchronization. Show all posts
Showing posts with label synchronization. Show all posts

Wednesday, March 7, 2012

rda.pull exception

Hi,

I have followed the technical artical "Remote Data Access Synchronization with SQL Server 2005 Compact Edition and Visual Basic.NET" to create a sample application.

But when I run debug mode and get an exception unexpected as following as doing rad.pull :

Immediate Window:

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

Message Box

[Contacts]

Code:

Private Sub RADPullButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RADPullButton.Click

Try
VerifyDatabaseExists()
Dim rda As SqlCeRemoteDataAccess
rda = GetRDAObject()
rda.Pull("Contacts", _
"SELECT CustomerID, CompanyName, ContactName, ContactTitle, Address, City, Region, PostalCode, Country, Phone, Fax FROM Customers", _
My.Settings.ServerOleDBNorthwindConnectionString, _
RdaTrackOption.TrackingOnWithIndexes, _
"Contacts_Errors")

Catch ex As Exception
MessageBox.Show(ex.ToString())
Finally
Windows.Forms.Cursor.Current = Cursors.Default
End Try

End Sub

Thanks in advance,

JD

You need to grab all the error information, by following the guidelines in this topic from SQL CE Books online - Handling Errors in Managed Applications http://msdn2.microsoft.com/en-us/library/ms174079.aspx

|||

HI ErikEJ,

I have following the link to catch real sql server compact edition error exception

Here is what I got and I still don't know what this meas:

Error Code:80004005
Message :[Contacts]
Minor Err: 28573
Source: Microsoft SQL Server Compact Edition
Err. Par.: Contacts

Thanks a lot,

JD

|||

There already is a local table with the same name as used in your RDA definition. See this very helpful post by laxmi at http://blogs.msdn.com/sqlservercompact/archive/2007/01/23/rda-subscriptions.aspx

|||

I am having a similar problem. When I pull the tables, I also create an error table (tablename_err). If I have to pull a table again, I first drop the table if it exists and then attempt to pull it again. I cannot do this though because when I drop the table, the error table does not get dropped and it will not let me pull a another error table (error 28573). I have attempted to explicitly drop the error table, but I am not allowed to do that either as that generates the 28605 error: "DDL operations on the table are restricted." I did not have this problem with SQLCE 2.0, only since I migrated to SQLMobile (3.0). How do I get rid of the original error tables so that I can pull again?

|||

One doesn't has to drop the error tables explicitly. These will be dropped automatically when the associated RDA tracked table is dropped. For e.g.:

rda.pull(@."pulltable", @."select * from foo", <conn string to SQL server>, RDATrackOption.TrackingOn, @."err_pull");

when one drops pulltable, err_pull automatically gets dropped since it is associated with pulltable which is being tracked. Please refer to "Maintaining Error Tables" in http://msdn2.microsoft.com/en-us/library/ms171782.aspx

Could you verify if you are indeed dropping all the local data tables into which you are attempting to pull data?

rda.pull exception

Hi,

I have followed the technical artical "Remote Data Access Synchronization with SQL Server 2005 Compact Edition and Visual Basic.NET" to create a sample application.

But when I run debug mode and get an exception unexpected as following as doing rad.pull :

Immediate Window:

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

Message Box

[Contacts]

Code:

Private Sub RADPullButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RADPullButton.Click

Try
VerifyDatabaseExists()
Dim rda As SqlCeRemoteDataAccess
rda = GetRDAObject()
rda.Pull("Contacts", _
"SELECT CustomerID, CompanyName, ContactName, ContactTitle, Address, City, Region, PostalCode, Country, Phone, Fax FROM Customers", _
My.Settings.ServerOleDBNorthwindConnectionString, _
RdaTrackOption.TrackingOnWithIndexes, _
"Contacts_Errors")

Catch ex As Exception
MessageBox.Show(ex.ToString())
Finally
Windows.Forms.Cursor.Current = Cursors.Default
End Try

End Sub

Thanks in advance,

JD

You need to grab all the error information, by following the guidelines in this topic from SQL CE Books online - Handling Errors in Managed Applications http://msdn2.microsoft.com/en-us/library/ms174079.aspx

|||

HI ErikEJ,

I have following the link to catch real sql server compact edition error exception

Here is what I got and I still don't know what this meas:

Error Code:80004005
Message :[Contacts]
Minor Err: 28573
Source: Microsoft SQL Server Compact Edition
Err. Par.: Contacts

Thanks a lot,

JD

|||

There already is a local table with the same name as used in your RDA definition. See this very helpful post by laxmi at http://blogs.msdn.com/sqlservercompact/archive/2007/01/23/rda-subscriptions.aspx

|||

I am having a similar problem. When I pull the tables, I also create an error table (tablename_err). If I have to pull a table again, I first drop the table if it exists and then attempt to pull it again. I cannot do this though because when I drop the table, the error table does not get dropped and it will not let me pull a another error table (error 28573). I have attempted to explicitly drop the error table, but I am not allowed to do that either as that generates the 28605 error: "DDL operations on the table are restricted." I did not have this problem with SQLCE 2.0, only since I migrated to SQLMobile (3.0). How do I get rid of the original error tables so that I can pull again?

|||

One doesn't has to drop the error tables explicitly. These will be dropped automatically when the associated RDA tracked table is dropped. For e.g.:

rda.pull(@."pulltable", @."select * from foo", <conn string to SQL server>, RDATrackOption.TrackingOn, @."err_pull");

when one drops pulltable, err_pull automatically gets dropped since it is associated with pulltable which is being tracked. Please refer to "Maintaining Error Tables" in http://msdn2.microsoft.com/en-us/library/ms171782.aspx

Could you verify if you are indeed dropping all the local data tables into which you are attempting to pull data?

rda.pull exception

Hi,

I have followed the technical artical "Remote Data Access Synchronization with SQL Server 2005 Compact Edition and Visual Basic.NET" to create a sample application.

But when I run debug mode and get an exception unexpected as following as doing rad.pull :

Immediate Window:

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

Message Box

[Contacts]

Code:

Private Sub RADPullButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RADPullButton.Click

Try
VerifyDatabaseExists()
Dim rda As SqlCeRemoteDataAccess
rda = GetRDAObject()
rda.Pull("Contacts", _
"SELECT CustomerID, CompanyName, ContactName, ContactTitle, Address, City, Region, PostalCode, Country, Phone, Fax FROM Customers", _
My.Settings.ServerOleDBNorthwindConnectionString, _
RdaTrackOption.TrackingOnWithIndexes, _
"Contacts_Errors")

Catch ex As Exception
MessageBox.Show(ex.ToString())
Finally
Windows.Forms.Cursor.Current = Cursors.Default
End Try

End Sub

Thanks in advance,

JD

You need to grab all the error information, by following the guidelines in this topic from SQL CE Books online - Handling Errors in Managed Applications http://msdn2.microsoft.com/en-us/library/ms174079.aspx

|||

HI ErikEJ,

I have following the link to catch real sql server compact edition error exception

Here is what I got and I still don't know what this meas:

Error Code:80004005
Message :[Contacts]
Minor Err: 28573
Source: Microsoft SQL Server Compact Edition
Err. Par.: Contacts

Thanks a lot,

JD

|||

There already is a local table with the same name as used in your RDA definition. See this very helpful post by laxmi at http://blogs.msdn.com/sqlservercompact/archive/2007/01/23/rda-subscriptions.aspx

|||

I am having a similar problem. When I pull the tables, I also create an error table (tablename_err). If I have to pull a table again, I first drop the table if it exists and then attempt to pull it again. I cannot do this though because when I drop the table, the error table does not get dropped and it will not let me pull a another error table (error 28573). I have attempted to explicitly drop the error table, but I am not allowed to do that either as that generates the 28605 error: "DDL operations on the table are restricted." I did not have this problem with SQLCE 2.0, only since I migrated to SQLMobile (3.0). How do I get rid of the original error tables so that I can pull again?

|||

One doesn't has to drop the error tables explicitly. These will be dropped automatically when the associated RDA tracked table is dropped. For e.g.:

rda.pull(@."pulltable", @."select * from foo", <conn string to SQL server>, RDATrackOption.TrackingOn, @."err_pull");

when one drops pulltable, err_pull automatically gets dropped since it is associated with pulltable which is being tracked. Please refer to "Maintaining Error Tables" in http://msdn2.microsoft.com/en-us/library/ms171782.aspx

Could you verify if you are indeed dropping all the local data tables into which you are attempting to pull data?

Saturday, February 25, 2012

RDA pull error on SSL VPN Client connection

I have a VB 2005 synchronization application that successfully pulls (through RDA) data to a SQL 2005 Mobile DB at my place of business, but when I try it at home on my SSL VPN Client connection, I get Hresult -2147012889 ("A request to send data to the computer running IIS has failed."). Typically, a -2147012889 error is a connection issue that relates to resolving the server name.

Here's a snippet:

Dim RemoteConn As String = "Provider=sqloledb; Data Source={company server};" _

& "Initial Catalog={companyDB}; User ID={username}; password={pass}"

'& "Persist Security Info=False;Integrated Security=False"

Dim SourceURL As String = "http://{Company server name}/MobileConnection/sqlcesa30.dll"

Dim SqlRA As New System.Data.SqlServerCe.SqlCeRemoteDataAccess

SqlRA.LocalConnectionString = strConn

SqlRA.InternetUrl = SourceURL

SqlRA.InternetLogin = ""

SqlRA.InternetPassword = ""

SqlRA.CompressionLevel = 3

Try

(Perform Pulls...etc..)

When I pull the sourceURL string and plug it into IE, it works fine. I get the "SQL Server Mobile Server Agent 3.0" message indicating that I have a solid connection over to IIS. That works fine.

But I can't figure out anything in the program. I've rotated the IP address with the name resolution and neither works for me in the program. The difference though when I use the IP address for the server is that I get a slightly different Hresult of -2147012867 (which means you can't connect to the server).

Also, I have IIS configured for anonymous access, the SQL DB I'm trying to pull from isn't restricting access, and my company doesn't have a proxy I need to go through.

Does anyone have any ideas for this issue?

Hi,

Did you find the answer? I have situation almost same as you and I am getting an error too. Do you know any tutorial for RDA using SSL?

Thanks in advance.

Dharam

RDA pull error on SSL VPN Client connection

I have a VB 2005 synchronization application that successfully pulls (through RDA) data to a SQL 2005 Mobile DB at my place of business, but when I try it at home on my SSL VPN Client connection, I get Hresult -2147012889 ("A request to send data to the computer running IIS has failed."). Typically, a -2147012889 error is a connection issue that relates to resolving the server name.

Here's a snippet:

Dim RemoteConn As String = "Provider=sqloledb; Data Source={company server};" _

& "Initial Catalog={companyDB}; User ID={username}; password={pass}"

'& "Persist Security Info=False;Integrated Security=False"

Dim SourceURL As String = "http://{Company server name}/MobileConnection/sqlcesa30.dll"

Dim SqlRA As New System.Data.SqlServerCe.SqlCeRemoteDataAccess

SqlRA.LocalConnectionString = strConn

SqlRA.InternetUrl = SourceURL

SqlRA.InternetLogin = ""

SqlRA.InternetPassword = ""

SqlRA.CompressionLevel = 3

Try

(Perform Pulls...etc..)

When I pull the sourceURL string and plug it into IE, it works fine. I get the "SQL Server Mobile Server Agent 3.0" message indicating that I have a solid connection over to IIS. That works fine.

But I can't figure out anything in the program. I've rotated the IP address with the name resolution and neither works for me in the program. The difference though when I use the IP address for the server is that I get a slightly different Hresult of -2147012867 (which means you can't connect to the server).

Also, I have IIS configured for anonymous access, the SQL DB I'm trying to pull from isn't restricting access, and my company doesn't have a proxy I need to go through.

Does anyone have any ideas for this issue?

Hi,

Did you find the answer? I have situation almost same as you and I am getting an error too. Do you know any tutorial for RDA using SSL?

Thanks in advance.

Dharam

RDA in SQL Server Express

Hi,
i need to make a synchronization between a sql server 2005 express and mobile database. Sql server express cannot act as publisher for merge replication.
Could anyone tell if it is possible to use the RDA replication between the express and mobile databases?
Thanks in advance,
Nuno Silva.
Hi Nuno,

It may be possible to use RDA with SQL Express.
let me try a few things and get back to you.

RDA Error

Hi all,

I am developing a Pocket PC application for synchronization SQL server 2005 and SQL CE whenever i am call a RDA's method like Pull() on my application all parameter is correct but this method give a error: "Header information is either corrupted or missing. [,,,Header name,,]", so Please help me how to solves this problem.

Hi Pavan,

Move to Sql Server Compact Edition forum, where would increases the chances for getting your question answered.

And, in most cases, this is the network configuration issue or parameters not set correct. So, could you access the server agent in IIS from your Pocket IE? And, if possible, could you please list out some code snippet, where throws the exception?

Thanks,

Zero Dai - MSFT

|||

Hi Zero Dai,

thanks for reply.

RDA Concurrency Timeout Issue

Hi Everyone,

I'm currently trying to test our prototype application using RDA
festures for synchronization. It had come a long way since we started
off with merge repliacation and sync services.

We use SQLCE 3.1 for the client database, SQLServer2005 on the server.
The application will execute pull method to pull data from the server
to the client. Testing on few client is fine. Now, we are aiming to
test with concurrency pull from client. My setup to test this scenario
will be getting 2 notebooks. One with dial up connection, the other
with broadband connection and run the client apps on each notebook to
sync. Everything was good until i open up few more client on each
notebook, i.e. notebook with dial up connection running 3 client apps
at the same time; notebook with broadband connection running 8 client
apps at the same time. This is when some of the apps will prompt
error, the rest will continue to sync. I observe the server CPU usage
which is consider very low (2%-15%) and network activity graph with
low fluctuation shown but the mouse movement on the server are very
very lag/slow.

My question is:
1. I get error showing "unable to get RDA primary key" and "Timeout
Error" when i execute our application pulling data from the sql server
2005. What was the caused for this error? The situation are explain
above. Is this problem occur due to too many clients running on 1 single pc?

2. Is there anyway to test concurrency for RDA from SQLserver2005 to SQLce using pull method?


Thank you!

New update on the error.

Despite any number of client pc used, RDA application cannot exceed 10 execution of RDA at the same time. It will prompt:

Error Code: 80004005
Message : A secure Socket layer (SSL) connection is required to access this site
Minor Error: 28015
SQL server compact edition

I do have SSL setup, and the 10 application is synchronizing but more than 10 it will show this error. I even setup another virtual directory with sqlceagent without SSL (only http) to test it out, but still the same result.

The server is windows XP professinal. The notebook is win Xp too.

|||

Updates on caused of error:

Note For Windows XP Professional, the maximum number of other computers that are permitted to simultaneously connect over the network is ten.

http://support.microsoft.com/kb/314882

thx.

Still have one last error.

Same situation but within the 10 client limit. I use 3 client on 1 PC with dial up, 3 client in a pc with broadband and 2 client in 1 pc with LAN connection.

Occasionally, it will prompt out:

Error Code: 80004005

Message: Cannot read RDA primary key

minor error : (forget)

after confirming this error, another eception is thrown:

Timeout Error!

Is this due to high cpu usage on the server?

thx

|||

Updates on error

if my connection string is "Provider = SQLOLEDB; Data Source = MyInstance; initial catalog =MyDatabase; user id =userID;password=password"

I will get this error, occasionally (not always).

Error code: 80004005
Message: Internal Error: Failure getting RDA primary key columns
Minor Error: 29054
Source: SQL Server Compact Edition

I read about the connection pool, so i decide to disable it
my connection string will be "Provider = SQLOLEDB; Data Source = MyInstance;OLE DB Services= -2; initial catalog =MyDatabase; user id =userID;password=password"

i will get NEW error (not always)

Error code: 80004005
Message: Failure to open SQL Server with given connect string. [ connect string = Provider = SQLOLEDB; Data Source = 10.104.1.2; OLE DB Services = -2; initial catalog = CAMS; user id = sa; password = sapassword ]
Minor Error: 28627
Source: Microsoft SQL Server Compact Edition
Err. Par.: Provider = SQLOLEDB; Data Source = MyInstance; OLE DB Services = -2; initial catalog = MyDatabase; user id = userID; password = password

after either one of these error pop out, it will followed by another 80004005 errror,

Error code: 80004005
Message: Timeout Expired
Minor Error: 0
Source: Microsoft OLEDB Provider for SQL Server

I cant seem to googled anything on this issue.

Please Advise

Thx