A
a
Hi gang,
I need some SOLID direction here.
I am planning to use DataSets and DataBinding in an app which will have a
few users (VB.NET / SQL Server). I need to be able to create an 'offline'
mode, where they do not have access to the WebService, and would therfore
need to store the data locally as XML, then merge into the DB later.
My issue relates to primary keys. As a former Access Guy (current app is
SQL Server 2000), I have grown accustomed to the use of Auto-Incrementing
primary keys for a table, then making relationships to this integer value.
In .NET Datasets, I know (painfully) that I would need to set the
AutoincrementStep and AutoincrementSeed of the dataset to -1 and 0, to avoid
issues. This doesn't work for me here, since I need the PrimaryKeys to be
the same in the 'offline' xml file and the online DB.
I am willing to change my ways, and begin to use either 'natural' keys, or
GUID fields. I would like some people to share their experience on using
either of these is similar situations. Are there performance hits
asssociated with relating tables to VARCHAR fields as oposed to INTs? Are
there any trade-offs I need to be aware of prior to using this approach?
Should I 'never use an AutoIncrement again'? Does databinding have any
issues using a GUID as the Value of a combobox, for example?
Thanks!!
Kevin
I need some SOLID direction here.
I am planning to use DataSets and DataBinding in an app which will have a
few users (VB.NET / SQL Server). I need to be able to create an 'offline'
mode, where they do not have access to the WebService, and would therfore
need to store the data locally as XML, then merge into the DB later.
My issue relates to primary keys. As a former Access Guy (current app is
SQL Server 2000), I have grown accustomed to the use of Auto-Incrementing
primary keys for a table, then making relationships to this integer value.
In .NET Datasets, I know (painfully) that I would need to set the
AutoincrementStep and AutoincrementSeed of the dataset to -1 and 0, to avoid
issues. This doesn't work for me here, since I need the PrimaryKeys to be
the same in the 'offline' xml file and the online DB.
I am willing to change my ways, and begin to use either 'natural' keys, or
GUID fields. I would like some people to share their experience on using
either of these is similar situations. Are there performance hits
asssociated with relating tables to VARCHAR fields as oposed to INTs? Are
there any trade-offs I need to be aware of prior to using this approach?
Should I 'never use an AutoIncrement again'? Does databinding have any
issues using a GUID as the Value of a combobox, for example?
Thanks!!
Kevin