Thanks,
Keith Flaspoehler
Check out the T-SQL NewID ( ) function in the SQL Server Books Online. This
function generates a GUID, and you can either call it explicitly or use it
as a DEFAULT constraint in the table definition.
-------------------------------------------
BP Margolin
Please reply only to the newsgroups.
When posting, inclusion of SQL (CREATE TABLE ..., INSERT ..., etc.) which
can be cut and pasted into Query Analyzer is appreciated.
"Keith Flaspoehler" <kfl...@mindspring.com> wrote in message
news:aa16h5$h0p$1...@nntp9.atl.mindspring.net...
Key are assigned BEFORE something is put into the database and the
methods vary, depending on your business rules. And they are not
"assigned" so much as "discovered"
>> In my table, I've got a field [sic] CompNo set up as a
uniqueidentifyer field [sic] type. Does SQL server automatically
populate this field [sic] or do I need to assign a value for this in
VB before I attempt to write the record? <<
SQL uses columns and not fields; fields are a file system concept,
like records. BIG difference. The whole idea of a uniqueidentifyer
is not just proprietary, it is non-relational. Can you tell what the
LOGICAL meaning of this uniqueidentifyer is in your data model? And
how you verify each uniqueidentifyer vlaue against reality?? You
aren't going to find it stamped onthe bottom of everythign in cration.
There is no check digit.
Plese read a book on data modeling. You are getting ready to set up a
disaster.