473,657 Members | 2,409 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Error checking

JJ
What's best practise in this situation:

Upon submitting data input on a detailsview (bound to an objectdatasourc e),
I need to check for a duplicate email address (in an sql database) and
present the error message (if the email already exists) on the detailsview.

The data is strored in the sql table via a stored procedure which returns a
negative number without adding the record, in case of duplicate entries.

The question is:

How do I get the objectdatasourc e to tell me that the insert/update action
returned a negative value?
Can I display the error message and keep the inputted data in the
detailsview fields?

Is this the best way for me to inhibit duplicate entries?
Thanks,

JJ

May 4 '07 #1
1 1427
JJ
I've managed to collect the returned negative value from the
objectdatasourc e using the OnInserted event.
My question no is how do I keep the values in the DetailsView to allow the
user to correct them?

When I refresh the page with the error message, the details view clears its
data.

JJ
"JJ" <ab*@xyz.comwro te in message
news:et******** ******@TK2MSFTN GP04.phx.gbl...
What's best practise in this situation:

Upon submitting data input on a detailsview (bound to an
objectdatasourc e), I need to check for a duplicate email address (in an
sql database) and present the error message (if the email already exists)
on the detailsview.

The data is strored in the sql table via a stored procedure which returns
a negative number without adding the record, in case of duplicate entries.

The question is:

How do I get the objectdatasourc e to tell me that the insert/update action
returned a negative value?
Can I display the error message and keep the inputted data in the
detailsview fields?

Is this the best way for me to inhibit duplicate entries?
Thanks,

JJ

May 4 '07 #2

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

Similar topics

2
3155
by: Tony | last post by:
bash-2.03# /configure --with-apxs=/usr/local/apache/bin/apxs --with-zlib=/usr /local --with-db3=/opt/sfw --with-openssl=/usr/local/ssl/ --enable-module=so loading cache ./config.cache checking host system type... i386-pc-solaris2.8 checking for gcc... gcc checking whether the C compiler (gcc ) works... yes checking whether the C compiler (gcc ) is a cross-compiler... no checking whether we are using GNU C... yes checking whether gcc...
3
2737
by: windandwaves | last post by:
Hi Gurus Does anyone know how I set the error trapping to option 2 in visual basic. I know that you can go to tools, options and then choose on unhandled errors only, but is there a VB command that I can use instead? Cheers Nicolaas
16
7215
by: TD | last post by:
This is the code under a command button - Dim ctl As Control For Each ctl In Me.Controls If ctl.BackColor <> RGB(255, 255, 255) Then ctl.BackColor = RGB(255, 255, 255) End If Next ctl
2
5897
by: Keith Bottner | last post by:
I just reinstalled my system and am in the process of getting PostgreSQL up and running again. During compilation of Postgres I received the following error: .... checking for main in -lunix... no checking for library containing crypt... -lcrypt checking for library containing fdatasync... none required checking for shmget in -lcygipc... no checking for readline... yes (-lreadline)
16
2614
by: lawrence k | last post by:
I've made it habit to check all returns in my code, and usually, on most projects, I'll have an error function that reports error messages to some central location. I recently worked on a project where someone suggested to me I was spending too much time writing error messages, and that I was therefore missing the benefit of using a scripting language. The idea, apparently, is that the PHP interpreter writes all the error messages that are...
0
11752
by: riggor | last post by:
I have been searching for answers to this question ... but all I have found is other people asking the same question..but I have not found an answer... I am trying to install Oracle 10g on Solaris 10 on x86. When I run the installer I get the following error message: "Error in writing to directory /tmp/OraInstall2006-10-12_05-05-40PM. Please ensure that this directory is writable and has atleast 69 MB of disk space. Installation...
3
2802
by: baur79 | last post by:
# python configure.py -q /usr/lib/qt-3.3/ This is the GPL version of PyQt 3.16 (licensed under the GNU General Public License) for Python 2.4.2 on linux2. Type 'L' to view the license. Type 'yes' to accept the terms of the license. Type 'no' to decline the terms of the license.
7
1730
by: zaperaj | last post by:
I use red hat 9 which comes with python2.2 installed in it. Wanting to use the latest version, i downloaded python 2.5.1 from the official python website. After downloading, i performed the following steps, but there is some error during the configuration process and hence i'm not able to run the "make" command after this. Following is the sequence of events that happened in my terminal: # tar xfz Python-2.5.1.tgz # cd Python-2.5.1 #...
5
1828
by: koolest1 | last post by:
I use red hat 9 which comes with python2.2 installed in it. Wanting to use the latest version, i downloaded python 2.5.1 from the official python website. After downloading, i performed the following steps, but there is some error during the configuration process and hence i'm not able to run the "make" command after this. Following is the sequence of events that happened in my terminal: # tar xfz Python-2.5.1.tgz # cd...
2
6351
by: akhilesh.noida | last post by:
I am trying to compile glibc-2.5 for ARM based board. But I am getting errors while configuring it. Please check and give your inputs for resolving this. configure command : $ ../glibc-2.5/configure --prefix=/mnt/new/Mars/glibc_HQ_test/GLIBC/ install/ --with-__thread --enable-kernel=2.6.11 --enable-shared
0
8310
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8826
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8732
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7330
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6166
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4306
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1615
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.