Posts

Showing posts from April, 2007

AutoIncrement in .NET and Autonumber in ACCESS

From my experience, try to avoid turning on both AutoIncrement (in DataColumn) in .NET and Autonumber in MSAccess at the same time. As somehow there is just no communication between them. They just work on their own. For example, when you have records in ACCESS having ID (1,2,3,4) and suppose the next ID be 10 (as doing some record add and delete before). AutoIncrement in .NET just don't know about it as it's AutoIncrementSeed can just automatically set to 5. Then 10 vs 5, I hope you can see how the problem being occurred. So avoid having them both at the same time.

Literal vs Label

When working with .NET, you may wonder the difference between Literal and Label . Actually, when both controls are converted to become HTML, Label will add a pair of <span></span> tag, while Literal keeps everything unchanged. So most of the time if would be better to use Literal instead of Label for the sake of simplicity.