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

Problem in creating partial replica MS ACCESS Version: 2003

P: 3
Hello everyone.
Your help is very much appreciated.
I am using MS ACCESS 2003.
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.

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 = 'CA' "
  9.  
  10.  

Thank you for you help.
Cheers
Roy
Mar 4 '07 #1
Share this Question
Share on Google+
3 Replies


ADezii
Expert 5K+
P: 8,597
Hello everyone.
Your help is very much appreciated.
I am using MS ACCESS 2003.
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.

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 = 'CA' "
  9.  
  10.  

Thank you for you help.
Cheers
Roy
Are you missing the following Declaration?
Expand|Select|Wrap|Line Numbers
  1. Dim repPartial as New JRO.Replica
If Data Source and Mode are Named Arguments, wouldn't the syntax be:
Expand|Select|Wrap|Line Numbers
  1. repPartial.ActiveConnection = "Data Source:=C:\MY_REPLICA.mdb; Mode:=Share Exclusive"
Mar 4 '07 #2

P: 3
Are you missing the following Declaration?
Expand|Select|Wrap|Line Numbers
  1. Dim repPartial as New JRO.Replica
If Data Source and Mode are Named Arguments, wouldn't the syntax be:
Expand|Select|Wrap|Line Numbers
  1. repPartial.ActiveConnection = "Data Source:=C:\MY_REPLICA.mdb; Mode:=Share Exclusive"
Thank you Adezii.
I'll try it and see what comes up.
Mar 5 '07 #3

ADezii
Expert 5K+
P: 8,597
Thank you Adezii.
I'll try it and see what comes up.
You're welcome - hope it works for you.
Mar 5 '07 #4

Post your reply

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