Новые сообщения [новые:0]
Дайджест
Горячие темы
Избранное [новые:0]
Форумы
Пользователи
Статистика
Статистика нагрузки
Мод. лог
Поиск
|
03.09.2003, 13:56
|
|||
---|---|---|---|
|
|||
Refresh DataSet |
|||
#18+
Dobrij den'.. Takoj vot vopros.. U menja jest' DataSet dsMain, kotorij soderjit kopiju dannix database..V techenii raboti klienta , drugoj klient modificiroval database, moja zadacha sdelat' refresh DataSet dsMain pervogo clienta, chtob on imel vsegda dannije svejije real_time.. Dlja etogo ja iz stroki modificirovannoj vtorim clientom sozdaju DataSet dsSecond i posliju etot DataSet pervomu clientu.. Vopros..kak sdelat' refresh dsMain, bez pisanija SQL kodov, jesli eto vozmojno, silami .NET biblioteki..Metod Merge, prosto dobovljajet modificirovannuju stroku v dsMain (vidno v DataGrid) tem samim dubliruja dannije, chto nedopustimo.. dsmain.Merge(dsSecond); // nepravilnij rezul'tat :( Kak eto vozmojno sdelat' ?? Spasibo.. ... |
|||
:
Нравится:
Не нравится:
|
|||
|
03.09.2003, 14:53
|
|||
---|---|---|---|
Refresh DataSet |
|||
#18+
Refreshing Data in a DataSet If you want to refresh the values in your DataSet with updated values from the server, use DataAdapter.Fill. If you have primary keys defined on your DataTable, DataAdapter.Fill matches new rows based on the primary keys, and applies the server values as it changes to the existing rows. The RowState of the refreshed rows are set to Unchanged even if they were modified before the refresh. Note that, if no primary key is defined for the DataTable, DataAdapter.Fill adds new rows with potentially duplicate primary key values. If you want to refresh a table with the current values from the serve while retaining any changes made to the rows in the table, you must first populate it with DataAdapter.Fill, fill a new DataTable, and then Merge that DataTable into the DataSet with a preserveChanges value of true. http://msdn.microsoft.com/library/?url=/msdnmag/issues/02/01/Basics/toc.asp ... |
|||
:
Нравится:
Не нравится:
|
|||
|
03.09.2003, 15:04
|
|||
---|---|---|---|
|
|||
Refresh DataSet |
|||
#18+
Da eo konechno xorosho, no jesli u menja tablica s 80000 recordami, to posle DataAdapter.Fill programma poidjet zagrujat' vse 80000 zanovo, na chto ujdejet ujma vremeni...ideja v tom chto poluchit' recordi tol'ko modeficirovannije ot servera, eto sdelano, i DOBAVIT' v pravil'noje mesto v mojej DataSet ... Vot v chem problema, a to delat' reFIll, eto konechno ponjatno.. ... |
|||
:
Нравится:
Не нравится:
|
|||
|
|
start [/forum/topic.php?fid=17&mobile=1&tid=1354311]: |
0ms |
get settings: |
12ms |
get forum list: |
14ms |
check forum access: |
4ms |
check topic access: |
4ms |
track hit: |
377ms |
get topic data: |
12ms |
get forum data: |
3ms |
get page messages: |
42ms |
get tp. blocked users: |
1ms |
others: | 14ms |
total: | 483ms |
0 / 0 |