473,395 Members | 1,379 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Detecting SQL Server error messages in Access

I am developing an Access front-end linked to SQL Server back-end. In
the triggers I raise an error as in:

RAISERROR 44447 'The record cannot be changed. RI rules require a
related record in table "Locations"'

However all I get in Access when this trigger raises its error is:

"ODBC --insert on a linked table 'Tasks' failed.

Is it possible to trap the error and create my own more meaningful one?
I have tried to trap errors in the BeforeUpdate and FormError etc
events but am unable to trap it.

May 10 '06 #1
2 3537
On 9 May 2006 03:42:33 -0700, "Jim Devenish"
<in***************@foobox.com> wrote:

ODBC-attached tables allow for quick development by Access programmers
who don't know SQL Server very well, but they also come with
limitations. You may just have found one.
Personally I do all SQL Server development using ADP (Access Data
Project), using stored procedures to insert data, and using
declarative referential integrity rather than triggers.
Trapping errors has never been a problem - refer to the Errors
collection in ADO.

-Tom.

I am developing an Access front-end linked to SQL Server back-end. In
the triggers I raise an error as in:

RAISERROR 44447 'The record cannot be changed. RI rules require a
related record in table "Locations"'

However all I get in Access when this trigger raises its error is:

"ODBC --insert on a linked table 'Tasks' failed.

Is it possible to trap the error and create my own more meaningful one?
I have tried to trap errors in the BeforeUpdate and FormError etc
events but am unable to trap it.


May 10 '06 #2
I have used RAISERROR in SQL Server triggers to write my own error
messages, but I was using an Access Project front end rather than a
regular Access database. The Project files are much more tightly
coupled to SQL Server and allow you to edit stored procedures,
triggers, and views directly rather than through Enterprise Manager.
And they report the RAISERROR messages.

You could try switching to a Project file. However, there are some
limitations. You can only attach to SQL Server tables, so if you need
to attach to two types of databases at once, you are out of luck. My
problem was with our DBAs. They would give me permissions to create and
edit tables and views, but they wouldn't give permissions to the
clients. So if you are in this situation and have clients who want to
write their own queries, you need an MS Access database.

May 10 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: | last post by:
I am accessing the same error-containing ASP page on an ISP server using w2k IE6 but with different effect. On the first computer I get several line of HTML outputed by ASP, shown correctly by...
6
by: Matt Hawley | last post by:
I'm facing a problem where I need to verify that my windows forms application has access to the internet before it can do anything. Currently, the only way I can think of is by creating a...
1
by: Covi | last post by:
Hello, I have a SS2K (SP3) that is appending very wierd looking error messages to the SQL Server Log (Current). The messages are not formatted as other log entries. The messages suggest some...
8
by: Rod | last post by:
I have been working with ASP.NET 1.1 for quite a while now. For some reason, opening some ASP.NET applications we wrote is producing the following error message: "The Web server reported...
3
by: Niranjan Roy | last post by:
When trying to create Web application project from inside my Visual Studio.Net, I am getting the following error: --------------------------- Microsoft Development Environment ...
2
by: KCHighland | last post by:
We have an ASP.NET application that permits anonymous access and runs as the IUSR account. The application accesses a SQL Server database located on a different server. All the data access code is...
0
by: Joergen Bech | last post by:
Fairly new to ASP.NET 1.1. Getting the error below when running application on a web server outside of my control, but only the first time I run it: 1. After a long period of inactivity (or...
4
by: coosa | last post by:
Hi, I was installing SQL Server on my machine and during installation my PC freezed. It happens frequently on my machine. So i tried after restarting to install it again and since then i always...
9
by: timor.super | last post by:
Hi group, I've written a client/server application, using the dotnet sockets. In my server, I have a thread waiting for messages with : ret = currSocket.Receive(buffer, 1024,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.