VBA Data Type for SQL Server uniqueidentifier Type

D

Don

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

Thanks!

Don
 
D

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
 
T

TC

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]
 
J

John Nurick

D

david epsom dot com dot au

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)
 
T

TC

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]
 
D

david epsom dot com dot au

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top