PC Review


Reply
Thread Tools Rate Thread

trouble with primary key element in a dataset

 
 
Filip De Backer
Guest
Posts: n/a
 
      25th Aug 2003
Hi,

I've got a dataset containing two elements in a table
called tblCollection: Collection_ID and CollectionName.
Collection_ID is an int (not an autonumber).

In my stored procedure that inserts a new record, I create
a new unique id. I use 4 stored procedures to get and save
the data because I want to perform some tests.

So I bind the dataset to a datagrid (I only show the
Collection column), but I can't insert any new row because
of the null value of the Collection_ID, even when I set
the nullability true in the dataset properties of that
Collection_ID element.

When I use default value 0, I can only create one new
record because (offcourse) the Collection_ID must be unique

Has anybody a solution?

Thanks a lot,

Filip
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Retrieve the Nth element in a dataset Epinn Microsoft Excel Worksheet Functions 6 27th Feb 2007 06:08 AM
<table> element with <table> element ... loading dataset timnels@gmail.com Microsoft C# .NET 0 23rd Jun 2005 04:01 PM
XML.NET - Inserting single element node into primary XML file =?Utf-8?B?SGl0ZXNo?= Microsoft ADO .NET 3 3rd Jun 2005 02:14 PM
How to get the element names using a dataset =?Utf-8?B?TWFoZXNo?= Microsoft ADO .NET 1 12th Apr 2005 03:36 AM
Single element in a DataSet Stephen Microsoft VB .NET 9 10th Oct 2003 12:59 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:07 AM.