Main   Products   Offshore Outsourcing   Customers   Partners   ContactUs  
JDBC Databases
  HXTT Access v7.1
 
  Buy Now
  Support
  Download
  Document
  FAQ
  HXTT Cobol v5.0
  HXTT DBF v7.1
  HXTT Excel v6.1
  HXTT Json v1.0
  HXTT Paradox v7.1
  HXTT PDF v2.0
  HXTT Text(CSV) v7.1
  HXTT Word v1.1
  HXTT XML v4.0
Offshore Outsourcing
Free Resources
  Firewall Tunneling
  Search Indexing Robot
  Conditional Compilation
  Password Recovery for MS Access
  Password Recovery for Corel Paradox
  Checksum Tool for MD5
  Character Set Converter
  Pyramid - Poker of ZYH
   
   
   
Heng Xing Tian Tai Lab of Xi'an City (abbr, HXTT)

HXTT ACCESS
GUID
Govind
2013-04-11 14:00:00
Hi,
There seems to be a problem while processing GUID datatype.

It's being identified as a Binary Data type( datatype = -2) instead of being identified as 1117 (Datatype OTHER + 6) as clarified by HXTT Support in another query posted by a user.

http://www.hxtt.com/support_view_issue.jsp?product=access&id=1176808563

Also please let us know the DDL to create a table with a GUID ( Replication id ) column.


GUID
Govind
2013-04-11 14:01:42
We are also having issues in reading and writing to an existing table with a GUID column. Hopefully if the datatype is addressed, then the reading and writing would work as designed.
Re:Re:GUID
HXTT Support
2013-04-11 18:30:58
>It's being identified as a Binary Data type( datatype = -2) instead of being identified as 1117 (Datatype OTHER + 6) as clarified by HXTT Support in another query posted by a user.
It has been modified to provide friend known sql type. So you will get Types.BINARY.
You can get the detailed information through
resultSetMetaData.getColumnTypeName(j) :returns GUID AUTO_INCREMENT
resultSetMetaData.getColumnType(j): return -2

typedef struct _GUID {

' unsigned long Data1;

' unsigned short Data2;

' unsigned short Data3;

' unsigned char Data4[8];

'} GUID;

For read, you can use resultSet.getBytes(j) or resultSet.getObject(j): a byte array with the length of 16
For instance, {AA5CCDD9-4BDD-4D11-920C-6E6D30FD330E} value in MS Access, the byte array will be D9 CD 5C AA (-) DD 4B (-) 11 4D (-) 92 0C (-) 6E 6D 30 FD 33 0E.

For write, you needn't to be care, because it will be automatically produced, and can't be modified in MS Access too. If you wish to update or insert it, you can use preparedStatement.setBytes(16-byte array) or SQL Escape Syntax{"varbinary" 'string'})
insert into bbb (a,b) values({"varbinary" '\x7B\x36\x43\x30\x30\x30\x30\x30\x30\x2D\x30\x30\x30\x30\x2D\x3E'}/* a hexstring for guid value */,'ccc');

If you wish to get an auto gernated key, you should use int AUTO_INCREMENT , since it's a simple int type.









Search Key   Search by Last 50 Questions




Google
 

Email: webmaster@hxtt.com
Copyright © 2003-2019 Heng Xing Tian Tai Lab of Xi'an City. | All Rights Reserved. | Privacy | Legal | Refund | Sitemap