By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,471 Members | 2,264 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,471 IT Pros & Developers. It's quick & easy.

Problem creating partial replica

P: 3
Hello everyone.
Your help is very much appreciated.
I am trying to create partial replica from the design master.
it all goes well until I try to set the filter using:
repPartial.Filters.Append "Customers",jrFilterTypeTable,"Customers.Regio n = 'CA' "
It throws an error:
"Invalid expression in the ReplicaFilter property".

The replica db, does contain "Customers" table, which has "Region" field.

Thank you for you help.
The code, looks like:
Expand|Select|Wrap|Line Numbers
  1. dim repFull as new JRO.Replica
  2. repFull.ActiveConnection = "C:\Program Files\Microsoft Office\OFFICE11\SAMPLES\northwind.mdb"
  3.  Call repFull.CreateReplica("C:\MY_REPLICA.mdb", "description", jrRepTypePartial)
  4.  
  5.     Set repFull = Nothing
  6.     ' open the partial replica in exclusive mode and apply filters
  7.     repPartial.ActiveConnection = "Data Source=C:\MY_REPLICA.mdb; Mode=Share Exclusive"
  8.     repPartial.Filters.Append "Customers", jrFilterTypeTable, "Customers.Region like 'CA' "
  9.  
Cheers
Roy
Mar 2 '07 #1
Share this Question
Share on Google+
3 Replies


NeoPa
Expert Mod 15k+
P: 31,186
Not an easy one...
I don't use these items myself but noticed a couple of points (neither of which would I expect to give problems but worth checking maybe) :
  1. Your explanation says (='CA') but the code says (like 'CA'). If you want a 'Like' then you probably want a wildcard char too.
  2. There is a trailing space in the string (after 'CA'). Can't see it would help.
Mar 3 '07 #2

nico5038
Expert 2.5K+
P: 3,072
Just a small warning, replication won't be possible in the new Access 2007 format.
I guess they want to "move" to using a Sharepoint server.

Personally I've seen too much trouble with replication. I just code data exchanges myself :-)

Nic;o)
Mar 3 '07 #3

ADezii
Expert 5K+
P: 8,597
Hello everyone.
Your help is very much appreciated.
I am trying to create partial replica from the design master.
it all goes well until I try to set the filter using:
repPartial.Filters.Append "Customers",jrFilterTypeTable,"Customers.Regio n = 'CA' "
It throws an error:
"Invalid expression in the ReplicaFilter property".

The replica db, does contain "Customers" table, which has "Region" field.

Thank you for you help.
The code, looks like:
Expand|Select|Wrap|Line Numbers
  1. dim repFull as new JRO.Replica
  2. repFull.ActiveConnection = "C:\Program Files\Microsoft Office\OFFICE11\SAMPLES\northwind.mdb"
  3.  Call repFull.CreateReplica("C:\MY_REPLICA.mdb", "description", jrRepTypePartial)
  4.  
  5.     Set repFull = Nothing
  6.     ' open the partial replica in exclusive mode and apply filters
  7.     repPartial.ActiveConnection = "Data Source=C:\MY_REPLICA.mdb; Mode=Share Exclusive"
  8.     repPartial.Filters.Append "Customers", jrFilterTypeTable, "Customers.Region like 'CA' "
  9.  
Cheers
Roy
Aren't you missing:
Expand|Select|Wrap|Line Numbers
  1. Dim repPartial as New JRO.Replica
Are Data Source and Mode Named Arguments? If so the syntax would be:
Expand|Select|Wrap|Line Numbers
  1. repPartial.ActiveConnection = "Data Source:=C:\MY_REPLICA.mdb; Mode:=Share Exclusive"
Mar 3 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.