VBA Data Type for SQL Server uniqueidentifier Type

  • Thread starter Thread starter Don
  • Start date Start date
D

Don

What is the proper (or preferred) VBA data type for MS SQL Server's
uniqueidentifier data type?

Thanks!

Don
 
Thanks to both of you!! The string utilities will cover my needs and the
article on GUIDs and keys is pretty interesting.

Thanks again!

Don
 
OT, but, why does he say that a double is subject to floating point
issues? A double is an exact representation, afaik. No fp issues
involved, at all ...

TC [MVP Access]
 
Most notably, doubles that go through

SQL Server->ODBC->Access

may be different by the time they go back

Access->ODBC->SQL Server

which was the primary reason for using a 'time_stamp'
field on SQL Server tables used with Access.

Generally, doubles are a bad choice for primary key
because, unless you are familiar with the platform,
you can't tell if they will work at all. So any
general db advice has to advise against that.

(david)
 
Holy cow! I always assumed they were "long long"s. I hope I haven't
used them anywhere! I certainly concur that a real/float data type
should never be used as a primary key. Thanks both, for the info.

Cheers,
TC [MVP Access]
 
One of the DateTime types in SQL Server is LongLong.

It maps to an Access DateTime field, and is the
field type used by the Access upsizing wizard for
Access DateTime fields.

So you always get floating point conversion on
DateTime fields when you connect Access to SQL
Server.

(david)
 
Back
Top