Jdetteman,
I am getting a data type conversion error when I used the function GUID2ByteArray() shown in the second link given by you
Dim bytGUID() as Byte
bytGUID = GUID2ByteArray("2DBC81CBB5
strSQL = "SELECT * FROM TrialTable1;"
Set db = CurrentDb
Set rs = db.OpenRecordset(strSQL, dbOpenDynaset, dbSeeChanges)
With rs
.AddNew
rs!guidField = bytGUID '<----- Error as described below.
.Update
end with
--------------------------
'Run time error '3421'
Data type conversion error'
--------------------------
TrialTable1 is the table Linked from sql8.0 into A2k.
guidField is the uniqueidentifier field in TrialTable1.
In the debug mode, i can see the byte array (bytGUID) getting filled right, but when i assign it to the recordset field, i get the error.
I tried to use the GUIDFromString() function as -
rs!guidField = Application.GUIDFromString
and I get the same Data Type conversion error.
I tried to use the ADO (2.7) and get a runtime error
'Multiple-step OLE DB operation generated errors. Check each oledb status value, if available'
I am using Dao 3.6.
I have increased the points to 75 to make-do.
Main Topics
Browse All Topics





by: JDettmanPosted on 2002-10-27 at 05:01:00ID: 7374558
A GUID is a byte array and when working with it you must use conversion functions. Access has two built in functions to help handle them: GUIDFromString() and StringFromGUID(). Take a look at the on-line help for some examples.
om/default .aspx?scid =kb;en- us; Q278099
om/default .aspx?scid =kb;en- us; Q197916
Also, the following will be of interest:
ACC2000: "????????" Is Displayed as the Value of a SQL Server GUID Field
http://support.microsoft.c
HOWTO: Use GUIDs w/ Access, SQL 6.5 and SQL 7
http://support.microsoft.c
The second article will be the most helpfull as it has lots of sample code and downloadable examples.
Jim.