Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 6th, 2004, 01:22 AM
Authorized User
 
Join Date: Aug 2004
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Baby_programmer Send a message via MSN to Baby_programmer Send a message via Yahoo to Baby_programmer
Default DB problem

Hi!
    plz any budy send some sample code that catches the SqlServer2000
exceptions.i need to know how to catch the exception of PRIMARY KEY PROBLEM (that is same primary key if send again to the data base),
i want that the application should not crash.

THANX

ashfaq
__________________
Baby Prgrammer
 
Old September 7th, 2004, 12:38 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
Send a message via Yahoo to melvik
Default

I have no idea about what r u going to do, but PRIMARY KEY is readonly ofter inserting the record!
Could u explane about ur job & error?!

Always:),
Hovik Melkomian.
 
Old September 7th, 2004, 01:36 AM
Authorized User
 
Join Date: Aug 2004
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Baby_programmer Send a message via MSN to Baby_programmer Send a message via Yahoo to Baby_programmer
Default

hi!i got a "PROBLEM"
Actually i have a simple aspx form having three textboxes 1 for RollNo, 2nd for StudentFirstName ,& 3rd for StudentLastName...
When i test my application whether i crahes or not (i insert the same rollno twice in the textbox ) the application sends error..
"NOTE :I am using SQLserver2000 and the rollno is selected as primary key"....I want my application should first check the roll no in database and the tell the user that the rollno already exist...
THANX

ashfaq
 
Old September 7th, 2004, 07:26 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,110
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Can you post your code?

 
Old September 7th, 2004, 10:21 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 540
Thanks: 0
Thanked 4 Times in 4 Posts
Default

So you are letting the user determine what the primary key is???

J





Similar Threads
Thread Thread Starter Forum Replies Last Post
Download Problem From Db may29adil Classic ASP Professional 0 May 10th, 2008 11:39 AM
Access DB Problem hermiod Classic ASP Basics 2 August 9th, 2007 03:47 AM
Help with DB Problem chuck BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003 0 November 30th, 2005 09:56 AM
db problem keyvan Classic ASP Databases 0 June 30th, 2003 01:10 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.