![]() |
|
|||||||
| ADO.NET Anything regarding DataAdapters, DataReaders, DataSets, etc. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
I am trying to create a very simple typed dataset using the designer in VS2005 to connect to my Article table on an SQL Server 2005 Express database, nothing out of the ordinary. I want to use optimistic concurrency because there will be many user working on that table.
But it seems that when I drag my table on the dataset designer's surface from the server explorer window, it does not create the update and delete queries correctly for concurrency issues detection. There are filters missing on the varchar(MAX) fields so another user may modify the article's content and I won't even know it when I overwrite their change. This is shown on the screenshots I attached. You can see there is no filter on any of the VARCHAR(MAX) columns. Is this caused by the full-text search option being disabled? I seems to solve the problem if I modify the DELETE and UPDATE queries manually, but I'm looking to know why it does that. Performance isn't an excuse to cut the corners that rough...
__________________
The human mind's capability to comprehend abstract concepts is limited to the vocabulary it can use to describe it. The more precise the building blocks, the more complex the thoughts that can emerge... Sounds like the evolution of programming languages doesn't it? |
|
||||
|
if your field is defined as varchar(max) then the designer might either:
not know what this is, because it's not VARCHAR(<number>) know that this is a huge field, and isnt good to search and compare from a performance point of view see what happens if you make a table with VARCHAR 100, 200, 400, 800, 1600 etc... and see if there is a cutoff point for the designer to make the field part of the search. ps that's one wierd looking opti query. Did the designer do that? The oracle ones look very different, ORring is done first
__________________
DW1: Data Walkthroughs 1.1...DW2: Data Walkthroughs 2.0...DDS: The DataSet Designer Surface...ANO: ADO.NET2 Orientation...DAN: Deeper ADO.NET...DNU...PQ Last edited by cjard; 01-20-2009 at 6:41 AM. |
|
|||
|
Quote:
I was just too lazy to add error handling all over my code to prevent color names or whatever from getting too long. I believe the VARCHAR(MAX) type will behave like any other VARCHAR type for size under 8KB (one page) in terms of performance so I never saw the point to limit the size of the fields. Am I circumventing best practices by doing this? Quote:
Anyway, I posted this question on the msdn forums and the answer was pretty much that it may be a bug or a by design decision. In any case, there's nothing to be done about it so I'll have to keep editing the queries manually and eventually remember to use Timestamp columns the next time I design a database.
__________________
The human mind's capability to comprehend abstract concepts is limited to the vocabulary it can use to describe it. The more precise the building blocks, the more complex the thoughts that can emerge... Sounds like the evolution of programming languages doesn't it? |
|
||||
|
Quote:
Quote:
Quote:
__________________
DW1: Data Walkthroughs 1.1...DW2: Data Walkthroughs 2.0...DDS: The DataSet Designer Surface...ANO: ADO.NET2 Orientation...DAN: Deeper ADO.NET...DNU...PQ |
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|