DataTable Column DataType

  • Thread starter Thread starter Jim Heavey
  • Start date Start date
J

Jim Heavey

If I am going to be retrieving a "UniqueIdentifier", what should the
"typeof()" value be in the constructor for the Datacolumn

dtSkaters.Columns.Add("EventID",typeof(int));

Thanks in advance for your assistance...
 
Jim,

Do you mean "UniqueIdentifier" as a SQL data type?

That's a GUID. Use System.Guid.

Kathleen
 
Hi Kathleen,

Uh, yes, my answer was a bit rushed.
Kathleen is correct.
As an alternative (if you are building strong typed dataset) you might put
typeof(System.String)
 
Back
Top