Why does my DataAdapter "Fill" only second time around? SQL Server Compact
Some background:
I'm trying to create a Server/Client Sync scenario for my application using Sync Services for ADO.NET specifically the LocalCache custom tool which sets the whole thing up for me.
My server DB has 5 Tables, all of which are being synchronized to the client application, which now has a SQL Server Compact DB with the same schema as the server DB. I have a dataset with some custom queries that I use to connect my app with the local database.
So far so good.
However in my application when I try to fill one of my tables with the table adapter on my form (the default "fill" method) it gives me the following exception:

No mapping exists from DbType Object to a known SqlDbType.

However, if I continue and do the fill again, IT WORKS without a problem.

        Try
            Me.WTSUsersTableAdapter.Fill(Me.WTSMainDataSet.WTSUsers)
        Catch ex As Exception
            MessageBox.Show(ex.Message)
        End Try

If I do the above code twice, one right after the other, the first one fails, the second works.

Another point to mention is that this happens only with this datatable, all the other 4 tables in the DB work as expected.

Does anyone have an idea what could be the cause of this?

Thanks a lot 


Why does my DataAdapter "Fill" only second time around? SQL Server Compact
===

Some background:
I'm trying to create a Server/Client Sync scenario for my application using Sync Services for ADO.NET specifically the LocalCache custom tool which sets the whole thing up for me.
My server DB has 5 Tables, all of which are being synchronized to the client application, which now has a SQL Server Compact DB with the same schema as the server DB. I have a dataset with some custom queries that I use to connect my app with the local database.
So far so good.
However in my application when I try to fill one of my tables with the table adapter on my form (the default "fill" method) it gives me the following exception:

No mapping exists from DbType Object to a known SqlDbType.

However, if I continue and do the fill again, IT WORKS without a problem.

        Try
            Me.WTSUsersTableAdapter.Fill(Me.WTSMainDataSet.WTSUsers)
        Catch ex As Exception
            MessageBox.Show(ex.Message)
        End Try

If I do the above code twice, one right after the other, the first one fails, the second works.

Another point to mention is that this happens only with this datatable, all the other 4 tables in the DB work as expected.

Does anyone have an idea what could be the cause of this?

Thanks a lot 

