Error updating GUID columns

  • Thread starter Thread starter Jeff Boenig
  • Start date Start date
J

Jeff Boenig

I have a uniqueidentifier column in my database (GUID).
In my schema, I declare it as ID. When I call
OleDbDataAdapter.Update() I get an error complaining that
it can't convert from System.String to System.Guid. Do I
have to declare it differently in my schema or do some
type of manual conversion?

Does anyone have any experience with using GUIDs as
primary keys? How does it compare to using a 4 byte
integer as a primary key? Is the performance difference
noticable?

Thanks,

Jeff Boenig
Elsinore Technologies
 
I use GUIDS and I like them a lot. Using them has eliminated all the
problems related to getting a PK back from the server. All my schemas, which
are created by using the "Generate Dataset" wizard, show string as the data
type in the designer but the XML though looks like this:

<xs:element name="AccountID" msdata:DataType="System.Guid, mscorlib,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
type="xs:string" />

The strongly typed dataset types them as GUID.

Willy
 
Back
Top