From: noreply@pgfoundry.org
To: noreply@pgfoundry.org
Subject: [ psqlodbc-Bugs-1010377 ] GUID code missing in convert.c ("Unrecognized C_parameter ..") and fix
Date: Tue, 15 Apr 2008 15:49:36 +0000 (UTC)
Message-ID: <20080415154936.A0A8917AE681@pgfoundry.org> (raw)
Bugs item #1010377, was opened at 2008-04-15 17:49
You can respond by visiting:
http://pgfoundry.org/tracker/?func=detail&atid=538&aid=1010377&group_id=1000125
Category: None
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Jan-Willem Goossens (jgoossens)
Assigned to: Nobody (None)
Summary: GUID code missing in convert.c ("Unrecognized C_parameter ..") and fix
Initial Comment:
Hi,
Either I'm missing something, or there's the GUID (UUID) implementation missing in ResolveOneParam(..) in convert.c [08.03.0100], since I'm getting "Unrecognized C_parameter type in copy_statement_with_parameters" exceptions with param_ctype == -11 (=SQL_C_GUID).
I admit I dont really know what I'm doing, but adding the following lines seems to work well:
[convert.c, line 3745]
#if (ODBCVER >= 0x0350)
case SQL_C_GUID:
{
SQLGUID *g = (SQLGUID *) buffer;
sprintf (param_string,
"%08lX-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X",
(unsigned long) g->Data1,
g->Data2, g->Data3,
g->Data4[0], g->Data4[1], g->Data4[2], g->Data4[3],
g->Data4[4], g->Data4[5], g->Data4[6], g->Data4[7]);
}
break;
#endif
[heavily inspired by http://www.opensource.apple.com/darwinsource/Current/iodbc-34/iodbc/iodbc/trace/GetData.c]
I hope this is useful..
Jan-Willem
----------------------------------------------------------------------
You can respond by visiting:
http://pgfoundry.org/tracker/?func=detail&atid=538&aid=1010377&group_id=1000125
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-odbc@postgresql.org
Cc: noreply@pgfoundry.org
Subject: Re: [ psqlodbc-Bugs-1010377 ] GUID code missing in convert.c ("Unrecognized C_parameter ..") and fix
In-Reply-To: <20080415154936.A0A8917AE681@pgfoundry.org>
References: <20080415154936.A0A8917AE681@pgfoundry.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox