PC Review


Reply
Thread Tools Rate Thread

Data Error 3157 - ODBC -- update on linked table failed

 
 
=?Utf-8?B?UGV0ZXIgQw==?=
Guest
Posts: n/a
 
      4th May 2006
I am migrating the tables for an application from Access 2003 to SQL Server
2000. The data in these tables is to be maintained by one department, but
the intent is for the rest of the company to have Read Only access. This is
being accomplished using the Window's Network logons and SQL user groups.

While testing, one of the "Read Only" users changed some data on a form...
no problem until he tried to navigate to another record, at which point the
form_error subroutine was called and he was presented with my customized
message box informing him that he was not authorized to update the data
(Response is set to acDataErrConinue). After clicking 'OK' he is then
presented with an application error message containing the following text and
Access hangs up:

ODBC--update on linked table 'tbl_Input' failed.
[Microsoft][ODBC SQL Server Driver][SQL Server]UPDATE permission denied
on object 'tbl_Input', database "Manufacturing', owner 'dbo'. (#229)


Is there anyway to ignore the attempt to change data and simply allow the
user to navigate through the records without hanging up the application?

 
Reply With Quote
 
 
 
 
=?Utf-8?B?QmFycnkgR2lsYmVydA==?=
Guest
Posts: n/a
 
      4th May 2006
How is he navigating to another record? Is he using the form's navigation
buttons? If so, you might try adding command buttons that do the navigation
and then trap the errors on those routines. I think you'll have more
flexibility in how you deal with the error.

HTH,
Barry

"Peter C" wrote:

> I am migrating the tables for an application from Access 2003 to SQL Server
> 2000. The data in these tables is to be maintained by one department, but
> the intent is for the rest of the company to have Read Only access. This is
> being accomplished using the Window's Network logons and SQL user groups.
>
> While testing, one of the "Read Only" users changed some data on a form...
> no problem until he tried to navigate to another record, at which point the
> form_error subroutine was called and he was presented with my customized
> message box informing him that he was not authorized to update the data
> (Response is set to acDataErrConinue). After clicking 'OK' he is then
> presented with an application error message containing the following text and
> Access hangs up:
>
> ODBC--update on linked table 'tbl_Input' failed.
> [Microsoft][ODBC SQL Server Driver][SQL Server]UPDATE permission denied
> on object 'tbl_Input', database "Manufacturing', owner 'dbo'. (#229)
>
>
> Is there anyway to ignore the attempt to change data and simply allow the
> user to navigate through the records without hanging up the application?
>

 
Reply With Quote
 
=?Utf-8?B?UGV0ZXIgQw==?=
Guest
Posts: n/a
 
      5th May 2006
The user was using the navigation buttons at the bottom of the form. I agree
that trapping this error in this way would give me more flexibility, but I
still don't know what to do to get rid of/avoid/back out of the problem.

One thing that I stumbled across that hold some promise is the idea of
changing the form.RecordsetType property to 'Snapshot' from 'Dynaset' , or
change the form.AllowEdits property to NO, based upon the permissions of the
user... But I don't know how to obtain the permissions of the user. Any
ideas on that would be helpful.

"Barry Gilbert" wrote:

> How is he navigating to another record? Is he using the form's navigation
> buttons? If so, you might try adding command buttons that do the navigation
> and then trap the errors on those routines. I think you'll have more
> flexibility in how you deal with the error.
>
> HTH,
> Barry
>
> "Peter C" wrote:
>
> > I am migrating the tables for an application from Access 2003 to SQL Server
> > 2000. The data in these tables is to be maintained by one department, but
> > the intent is for the rest of the company to have Read Only access. This is
> > being accomplished using the Window's Network logons and SQL user groups.
> >
> > While testing, one of the "Read Only" users changed some data on a form...
> > no problem until he tried to navigate to another record, at which point the
> > form_error subroutine was called and he was presented with my customized
> > message box informing him that he was not authorized to update the data
> > (Response is set to acDataErrConinue). After clicking 'OK' he is then
> > presented with an application error message containing the following text and
> > Access hangs up:
> >
> > ODBC--update on linked table 'tbl_Input' failed.
> > [Microsoft][ODBC SQL Server Driver][SQL Server]UPDATE permission denied
> > on object 'tbl_Input', database "Manufacturing', owner 'dbo'. (#229)
> >
> >
> > Is there anyway to ignore the attempt to change data and simply allow the
> > user to navigate through the records without hanging up the application?
> >

 
Reply With Quote
 
=?Utf-8?B?QmFycnkgR2lsYmVydA==?=
Guest
Posts: n/a
 
      5th May 2006
Changing to snapshot would prevent changes, but you might still get a gnarly
error. I've never been a big fan of the built-in navigation buttons. I like
the flexibility I get from coding my own navigation, like being able to gray
out a button if they are at the last record.
There are several system stored procs that you can use to evaluate SQL
permissions. Check BOL.

Barry

"Peter C" wrote:

> The user was using the navigation buttons at the bottom of the form. I agree
> that trapping this error in this way would give me more flexibility, but I
> still don't know what to do to get rid of/avoid/back out of the problem.
>
> One thing that I stumbled across that hold some promise is the idea of
> changing the form.RecordsetType property to 'Snapshot' from 'Dynaset' , or
> change the form.AllowEdits property to NO, based upon the permissions of the
> user... But I don't know how to obtain the permissions of the user. Any
> ideas on that would be helpful.
>
> "Barry Gilbert" wrote:
>
> > How is he navigating to another record? Is he using the form's navigation
> > buttons? If so, you might try adding command buttons that do the navigation
> > and then trap the errors on those routines. I think you'll have more
> > flexibility in how you deal with the error.
> >
> > HTH,
> > Barry
> >
> > "Peter C" wrote:
> >
> > > I am migrating the tables for an application from Access 2003 to SQL Server
> > > 2000. The data in these tables is to be maintained by one department, but
> > > the intent is for the rest of the company to have Read Only access. This is
> > > being accomplished using the Window's Network logons and SQL user groups.
> > >
> > > While testing, one of the "Read Only" users changed some data on a form...
> > > no problem until he tried to navigate to another record, at which point the
> > > form_error subroutine was called and he was presented with my customized
> > > message box informing him that he was not authorized to update the data
> > > (Response is set to acDataErrConinue). After clicking 'OK' he is then
> > > presented with an application error message containing the following text and
> > > Access hangs up:
> > >
> > > ODBC--update on linked table 'tbl_Input' failed.
> > > [Microsoft][ODBC SQL Server Driver][SQL Server]UPDATE permission denied
> > > on object 'tbl_Input', database "Manufacturing', owner 'dbo'. (#229)
> > >
> > >
> > > Is there anyway to ignore the attempt to change data and simply allow the
> > > user to navigate through the records without hanging up the application?
> > >

 
Reply With Quote
 
Marshall Barton
Guest
Posts: n/a
 
      7th May 2006
Peter C <Peter (E-Mail Removed)> wrote:

>I am migrating the tables for an application from Access 2003 to SQL Server
>2000. The data in these tables is to be maintained by one department, but
>the intent is for the rest of the company to have Read Only access. This is
>being accomplished using the Window's Network logons and SQL user groups.
>
>While testing, one of the "Read Only" users changed some data on a form...
>no problem until he tried to navigate to another record, at which point the
>form_error subroutine was called and he was presented with my customized
>message box informing him that he was not authorized to update the data
>(Response is set to acDataErrConinue). After clicking 'OK' he is then
>presented with an application error message containing the following text and
>Access hangs up:
>
> ODBC--update on linked table 'tbl_Input' failed.
> [Microsoft][ODBC SQL Server Driver][SQL Server]UPDATE permission denied
>on object 'tbl_Input', database "Manufacturing', owner 'dbo'. (#229)
>
>
>Is there anyway to ignore the attempt to change data and simply allow the
>user to navigate through the records without hanging up the application?



Rather than trying to trap an error when users edit a
record they're not supposed to edit, I would set AllowEdits
in the Load event (for all records) or the Current event for
specific records. If you also have one or more unbound
controls that are used for something else, then set each
bound control's Lock property.

--
Marsh
MVP [MS Access]
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error 3157: "ODBC - update on a linked table <table name> failed Jannah Microsoft Access 4 5th Sep 2008 08:44 PM
Run-Time Error 3157 - Link SQL Table ODBC- Failed TheNovice Microsoft Access VBA Modules 4 25th Jun 2008 04:37 PM
odbc--update on a linked table failed Rosco Microsoft Access Database Table Design 1 29th May 2008 07:21 PM
ODBC Update on a Linked table failed =?Utf-8?B?Q3Jvc3No?= Microsoft Access Forms 0 17th Nov 2006 06:49 PM
ODBC Update failed on linked table Robert Kewan Microsoft Access ADP SQL Server 0 12th Feb 2004 02:14 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:24 AM.