473,503 Members | 1,650 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Shouldn't VB.Net Throw An Exception - Setting A Primary Key

Hello,
I was setting the primary key on a table which was a collection of 3 columns.
I mispelled the name of the second column when I built the array of collumns
when I created the array of collumns for the primary key. When I used the
"dt.primarykey(myArrayOfKeys)" no exception was thrown, and rather then the
primary key being a set of 3 columns, it was only a single column.

When you make this type of mistake when setting foreign keys, that process
throws and exception.

Why the inconsistency?


-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
Nov 20 '05 #1
1 3286
Hello,

"Jim Heavey" <Ji*******@hotmail.com> schrieb:
I was setting the primary key on a table which was a
collection of 3 columns. I mispelled the name of the
second column when I built the array of collumns
when I created the array of collumns for the primary
key. When I used the "dt.primarykey(myArrayOfKeys)"
no exception was thrown, and rather then the primary
key being a set of 3 columns, it was only a single column.

When you make this type of mistake when setting foreign
keys, that process throws and exception.


I would ask the database professionals too:

news://msnews.microsoft.com/microsof...amework.adonet

Web interface:

http://msdn.microsoft.com/newsgroups...amework.adonet

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
http://www.mvps.org/dotnet
Nov 20 '05 #2

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

Similar topics

3
3480
by: Pierre Rouleau | last post by:
The std::exception class defined in the Standard C++ <exception> header specifies that the constructors could throw any exception becuase they do not have a throw() specification. Why is that? ...
9
2677
by: wij | last post by:
Hi: In recent pondering, I am begining suspecting the usefulness of throw specification in the language(I know this opinion have long existed), even for delete!. The primary reason is that...
0
1210
by: Daniel Weber | last post by:
Hi! In my code I create a CryptoStream around another stream of my own, with CryptoStreamMode.Read. So I just can read from the CryptoStream. When I close that CryptoStream, however, the...
6
5704
by: Arjen | last post by:
Hi, I'm reading the enterprise library documentation and there I see the throw statement. try { // run code } catch(Exception ex) {
4
4188
by: Frank | last post by:
Hi, what should I use to raise an error: RAISE or THROW And I am asking this with regard to the future VB.NET developments. Is Raise the old way and Throw the new? Throw does not have parms to...
4
4855
by: Joe Van Dyk | last post by:
The FAQ at http://www.parashift.com/c++-faq-lite/exceptions.html#faq-17.6 says that you shouldn't throw built-in exceptions. I'm not sure why I shouldn't throw something like std::domain_error...
5
1823
by: Kenneth Porter | last post by:
I've read this article and have some followup questions. http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thr ead/9d5324ce02f4d89b/ I'm working on an embedded robotics...
28
2817
by: Jess | last post by:
Hello, It is said that if I implement a "swap" member function, then it should never throw any exception. However, if I implement "swap" non- member function, then the restriction doesn't...
6
1944
by: jason.cipriani | last post by:
Consider this program, which defines a template class who's template parameter is the type of an exception that can be thrown by members of the class: === BEGIN EXAMPLE === #include...
0
7202
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
7084
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
7278
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,...
0
7328
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...
1
6991
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
4672
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...
0
3167
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
736
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
380
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...

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.