Showing posts with label based. Show all posts
Showing posts with label based. Show all posts

Tuesday, March 20, 2012

Background replication

We are developing a embedded system based on Windows CE 5 and SQL Server CE 3 in C++ where we need to do merge replication in background while the front end application still need to perform operations on the database. A solution would be to run the merge replication on a separate thread while the application thread still can access the database to do inserts and updates. I have been researching if it is possible to access the database with queries during a merge replication, but I can not find an answere. Does anyone have experience of this and generally know if it is possible to implement with SQL Server CE 3 in the native API?

Best regards

Johan Johansson

This article may help you understand the implications of a user trying to access SQL Mobile while merge replication is happening.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsql90/html/sql2k5mobilesynch.asp

Darren

|||

Thanks Darren, this is exactly what I was looking for.

Best regards

Johan

Sunday, February 19, 2012

Avg based on column values

Greetings,

I need to avg column data based on grid textboxes. I cannot use AVG because the column values come from a comma delimited string. I have tried using !Parameters to store a count and total for each column but they are always read only. What is the best approach.

The columns come from a field which is in the format of (99,75,60,100,-1,20,-1,80,75) for each record

-1 means the values are not counted in the average. I have a function for each textbox that parses the value from the list based on the column index. There can be 1 to many columns.

Everytime I to set the value of a field or parameter at runtime I get a read-only error.

Maybee the only way is to use calculated fields.

Any ideas.

Create two functions:

line_sum(string) returns sum numbers in your Field|||

Thanks for the input.

It looks like this would work for row based averages. I should have stated that I need to Avg columnwise in the footer.

I have the database calcing and returning a row based avaerage for each record. I was looking for an OnNewRecord event or someway of calcing on vars.

I may have to create a new field of comma averages for each row. bleh!