PC Review


Reply
Thread Tools Rate Thread

CollectionView, AutoIncrement and Source Changes

 
 
Frederik
Guest
Posts: n/a
 
      1st Jul 2011
Hi all,

I'm creating a C#/WPF application. I use SQL Server 2008 on the
backend. I use a SqlDataAdapter to fill a DataTable. The DataTable is
used as the source for a CollectionView:

// CollectionView CV =
(CollectionView)CollectionViewSource.GetDefaultView(myDataTable)

Problem: if I add a new record to the DataTable/CollectionView, I do
not see the value of the id-column (textbox binded to this column is
empty). The column in the DB is an auto-increment column, so it should
have a value, but it's not shown in my c# app.

Secondly, is there an easy way to receive the changed records from the
DB? I do not want to select 6000+ records every time I hit refresh, I
prefer to only add the changed records if possible?

/BR
/Fre
 
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
Autoincrement Bre-x Microsoft Access Getting Started 4 10th May 2010 03:14 PM
autoincrement PK =?Utf-8?B?Q2h1Y2s=?= Microsoft Access 27 28th Sep 2007 07:29 PM
Getting Autoincrement ID in ADO.NET tascienu@ecoaches.com Microsoft ADO .NET 6 12th Sep 2005 06:02 PM
autoincrement Herman Lammers Microsoft ADO .NET 1 18th May 2004 01:28 PM
Re: ViewState + AutoIncrement -- Okay; Session + AutoIncrement -- Not okay Gene Gorokhovsky Microsoft ASP .NET 0 17th Jul 2003 03:48 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:52 PM.