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

  • Thread starter Thread starter Jim Heavey
  • Start date Start date
J

Jim Heavey

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?
 
Hello,

Jim Heavey said:
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/microsoft.public.dotnet.framework.adonet

Web interface:

http://msdn.microsoft.com/newsgroup...roup=microsoft.public.dotnet.framework.adonet
 
Back
Top