Merge Replication

M

Mani

Hi all,

I am trying to perform a "Merge Replication" from the PPC simulator with
VS.net 2003. Has anyone experienced this before or have any resolution?
the SQL Server publiation is setup on another machine which also serves as
the SQL Server CE Agent (configured with anonymous access only with NTFS
permissions)

Funny thing here is there is no message!! is the SQL CE team here?

HResult -2147024891
Message ""
NativeError 0
Source "Microsoft SQL Server 2000 Windows CE Edition"


oRpl = new SqlCeReplication();
oRpl.Publisher = "<<publisher>>";
oRpl.PublisherLogin = "dbuser";
oRpl.PublisherPassword = "dbpassword";
oRpl.InternetUrl = "http://192.168.2.84/pda/sscesa20.dll";
oRpl.InternetLogin = "AnotherMachine\\IUSR_AnothermachineName";
oRpl.InternetPassword = "";
oRpl.Subscriber = "CESubscriberTest";
oRpl.Publication = "Northwind";
oRpl.PublisherDatabase = "Northwind";
oRpl.SubscriberConnectionString =
"Provider=Microsoft.SQLSERVER.OLEDB.CE.2.0;Data Source=" +
this.myDataSource;

/// fyi, this.myDataSource = "\\program
files\\CF\\Inventory\\TestDB1.sdf";

oRpl.Synchronize(); [CODE FAILS HERE and throws exception]



Sorry for the dupliate message, first one posted in the sqlserver.ce forum.
Thank you,
 
M

mgarner1980

not too sure about the error you're getting, but I found I had to set the
publishersecuritymode to NT If I was using nt authentication.

you'll also need to call addsubscription if the subscription doesn't already
exist.

in addition your IIS anonymous login user account must have priviledges for
the publication share.

I'm only listing these things cuz these were all hurdles I had to jump in
order to get it working correct.

BUT!!!!!!!!! I must add that that was on my device. I've never tried it on
the emulator. I've found the emulator is cool for small stuff, but not that
great for real apps. (just my opinion).

Hope some of this helps out in the future if anything.
 
A

Alex Feinman [MVP]

Right. Open the ErrorParameters and NumericErrorParameters. The error
message will be there

--
Alex Feinman
---
Visit http://www.opennetcf.org
Mani said:
forgive me for this idiocracy.. but as you see from the screen shot, the
innerexception is blank!
thank you





Alex Feinman said:
Check the InnerException member - go over Errors collection

--
Alex Feinman
---
Visit http://www.opennetcf.org
Mani said:
Hi all,

I am trying to perform a "Merge Replication" from the PPC simulator with
VS.net 2003. Has anyone experienced this before or have any resolution?
the SQL Server publiation is setup on another machine which also
serves
as
the SQL Server CE Agent (configured with anonymous access only with NTFS
permissions)

Funny thing here is there is no message!! is the SQL CE team here?

HResult -2147024891
Message ""
NativeError 0
Source "Microsoft SQL Server 2000 Windows CE Edition"


oRpl = new SqlCeReplication();
oRpl.Publisher = "<<publisher>>";
oRpl.PublisherLogin = "dbuser";
oRpl.PublisherPassword = "dbpassword";
oRpl.InternetUrl = "http://192.168.2.84/pda/sscesa20.dll";
oRpl.InternetLogin = "AnotherMachine\\IUSR_AnothermachineName";
oRpl.InternetPassword = "";
oRpl.Subscriber = "CESubscriberTest";
oRpl.Publication = "Northwind";
oRpl.PublisherDatabase = "Northwind";
oRpl.SubscriberConnectionString =
"Provider=Microsoft.SQLSERVER.OLEDB.CE.2.0;Data Source=" +
this.myDataSource;

/// fyi, this.myDataSource = "\\program
files\\CF\\Inventory\\TestDB1.sdf";

oRpl.Synchronize(); [CODE FAILS HERE and throws exception]



Sorry for the dupliate message, first one posted in the sqlserver.ce forum.
Thank you,
 
M

Mani

Thank you Alex,
But, the ErrorParameters/NumericErrorParameters were also blank (containing
three blank elements)

But I solved (not solved...got around) this problem using tips from
mgarner1980 in the sql server ce group ( as in my first message, I had my
posting originally in there with the same subject)

Thanks.


Alex Feinman said:
Right. Open the ErrorParameters and NumericErrorParameters. The error
message will be there

--
Alex Feinman
---
Visit http://www.opennetcf.org
Mani said:
forgive me for this idiocracy.. but as you see from the screen shot, the
innerexception is blank!
thank you





Alex Feinman said:
Check the InnerException member - go over Errors collection

--
Alex Feinman
---
Visit http://www.opennetcf.org
"Mani" <mani_AT_evikasystemsdotcom> wrote in message
Hi all,

I am trying to perform a "Merge Replication" from the PPC simulator with
VS.net 2003. Has anyone experienced this before or have any resolution?
the SQL Server publiation is setup on another machine which also serves
as
the SQL Server CE Agent (configured with anonymous access only with NTFS
permissions)

Funny thing here is there is no message!! is the SQL CE team here?

HResult -2147024891
Message ""
NativeError 0
Source "Microsoft SQL Server 2000 Windows CE Edition"


oRpl = new SqlCeReplication();
oRpl.Publisher = "<<publisher>>";
oRpl.PublisherLogin = "dbuser";
oRpl.PublisherPassword = "dbpassword";
oRpl.InternetUrl = "http://192.168.2.84/pda/sscesa20.dll";
oRpl.InternetLogin = "AnotherMachine\\IUSR_AnothermachineName";
oRpl.InternetPassword = "";
oRpl.Subscriber = "CESubscriberTest";
oRpl.Publication = "Northwind";
oRpl.PublisherDatabase = "Northwind";
oRpl.SubscriberConnectionString =
"Provider=Microsoft.SQLSERVER.OLEDB.CE.2.0;Data Source=" +
this.myDataSource;

/// fyi, this.myDataSource = "\\program
files\\CF\\Inventory\\TestDB1.sdf";

oRpl.Synchronize(); [CODE FAILS HERE and throws exception]



Sorry for the dupliate message, first one posted in the sqlserver.ce
forum.
Thank you,
 
Top