Data in linked back end tables are not saved from the front end (1 Viewer)

Semik

New member
Local time
Today, 02:30
Joined
Jun 19, 2015
Messages
6
Hi all,

I have split database (B/E is in the SharePoint library, F/E has users on a local PCs). Sometimes, when I update/add data (does not matter if it is via form or directly in the table) it looks OK, but when I re-open the database, the data are gone.
Problem is that I cannot catch the moment when data were not saved (sometimes data are saved, sometimes not). I can point out this:
  • if I re-enter the missing data, primary key continues subsequently, it looks like the data have never been entered
  • I tried to use script
    Code:
    If Me.Dirty Then Me.Dirty = False
    on "On Close" form event, does not help
  • B/E is linked by VBA code and it looks OK (no error, Link Manager shows correct path)
I suspect interrupted connetion to the SharePoint but I don't know how to check it. I implemented VBA script co keep open connection to the SP but the issue persists.
I searched a lot of forums but no idea.

Thanks

Semik
 

Semik

New member
Local time
Today, 02:30
Joined
Jun 19, 2015
Messages
6
Any idea, guys?
I found a tip to open on a startup a simple form containing some data from B/E in a hidden mode. But - today I added data to the tables via Append Query and after re-opening the data were again gone :(
I don't understand how it can occur... :banghead:
 

DennisOJensen

Registered User.
Local time
Yesterday, 20:30
Joined
Jun 28, 2015
Messages
62
Try using a Stored Procedure on the database side that returns a success/fail value to the calling front-end -- or if not viable try having the Stored Procedure set a different value after it was supposed to complete successfully. I do not remember does Access have Try..Catch or error handling in stored procedures these days

Also do you have error handling in the calling program? And I do not me "On Error Resume Next" that is not handling that is ignoring.
 

Semik

New member
Local time
Today, 02:30
Joined
Jun 19, 2015
Messages
6
Hi all,

could you explain me the following Access behavior?

I opened my database (RefreshLinks script on the start-up run correctly), then I disconnected the Ethernet cable, opened the linked table and modified some records (directly in the table). Why Access didn't show any error message that the connection to the back-end was interrupted? Data were updated in the table but DIDN'T saved in the back-end.

Probably it could be the issue - the connection is lost for a short time, the data look updated but don't.

@DennisOJensen: Stored Procedures are a bit difficult for me... :(

Thanks

EDIT: another observation - if I disconnect Ethernet cable after start-up, the database looks like offline - I can modify records without internet connection :confused: If I close the database without connection, the data are lost. But if I connect the cable before exit, data are saved. What's the hell...
 
Last edited:

DennisOJensen

Registered User.
Local time
Yesterday, 20:30
Joined
Jun 28, 2015
Messages
62
I can help you with the Stored Procedure if you need it. They are fairly simple to implement.

As for the Offline/Online issue -- are you using data binding?
 

Semik

New member
Local time
Today, 02:30
Joined
Jun 19, 2015
Messages
6
I can help you with the Stored Procedure if you need it. They are fairly simple to implement.

As for the Offline/Online issue -- are you using data binding?

Thank you, I really appreciate your offer. I have searched some examples on the internet but the SQL server were often mentioned but I have the B/E on the simple SharePoint library.

What do you mean "data binding"? :eek:

Thanks
 

DennisOJensen

Registered User.
Local time
Yesterday, 20:30
Joined
Jun 28, 2015
Messages
62
Data Binding: This is the where the fields and views of the User Interface (front-end) are connected directly to the back-end database tables. Such that if you make a change to something on the front-end it is reflected in automatic changes to the back-end.
 

Semik

New member
Local time
Today, 02:30
Joined
Jun 19, 2015
Messages
6
Data Binding: This is the where the fields and views of the User Interface (front-end) are connected directly to the back-end database tables. Such that if you make a change to something on the front-end it is reflected in automatic changes to the back-end.

It should be... I have the back-end linked automatically by VBA script. Problem is that the data are reflected in the back-end sometimes. How/where to check it?
 

vbaInet

AWF VIP
Local time
Today, 01:30
Joined
Jan 22, 2010
Messages
26,374
Sounds like a dropped connection to your Sharepoint site. Perhaps it's going offline and after re-connecting it doesn't 'push' the records back to the site.

Look for the option on Access called something like "Caching Sharepoint sites" and check/uncheck the box to see if that helps.
 

DennisOJensen

Registered User.
Local time
Yesterday, 20:30
Joined
Jun 28, 2015
Messages
62
Personally this is one of those reasons I do not use data binding - once the change has been made they click the Save button and that handles the process if the database is separate from the front-end then my front end has a set of update tables in case the connection to the back-end is broken. Then it checks the back-end from time to time once it has been re-established it commits the changes to the back-end... there is a lot more intricacies tied in here especially if the back-end is getting hit by more than one front-end but that is the basic gist of it all.
 

Users who are viewing this thread

Top Bottom