[pywin32-bugs] [ pywin32-Bugs-3495033 ] Incorrect Handling of adGUID
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: SourceForge.net <no...@so...> - 2012-02-27 16:06:49
|
Bugs item #3495033, was opened at 2012-02-27 08:06 Message generated for change (Tracker Item Submitted) made by alkamo You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3495033&group_id=78018 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: adodbapi Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Allan (alkamo) Assigned to: Vernon Cole (kf7xm) Summary: Incorrect Handling of adGUID Initial Comment: When a GUID value is written to a SQL Server database, it is truncated to 16 characters. This means that when you try to write "{71A4F49E-39F3-42B1-A41E-48FF154996E6}", only "{71A4F49E-39F3-4" is actually passed to the database (which, naturally, raises an error). This seems that it may be an issue with the ADO interface: when the parameters are refreshed from the "ADODB.Command" object, the size is returned as 16 and that is used to format the parameters later. I have worked around this by creating changing the _buildADOparameterList procedure of the cursor class to set the size of UUID fields after the parameter list is refreshed, as demonstrated in the attached code. The size is set to 38, to account for the 32-character UUID with 2 curly braces and four dashes, which is the format returned by a SQL Server database. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3495033&group_id=78018 |