Feature #72

SQLDescribeParam

Added by Mads Lindstrøm 187 days ago. Updated 187 days ago.

Status :New Start :05/30/2008
Priority :Normal Due date :
Assigned to :- % Done :

0%

Category :-
Target version :-
Resolution :


Description

Hi John

I recently emailed you about this feature, as I had overlooked that I could make feature requests here. I will restate the issue and provide some code. Also I have investigated the database support of SQLDescribeParam.

Basically, I would like it if HDBC had support for the ODBC function SQLDescribeParam http://msdn.microsoft.com/en-us/library/ms710188(VS.85).aspx .

I have implemented the SQLDescribeParam feature. I have attached a patch. It is not implemented nicely and it do not follow the HDBC design very nicely. It was just so that I had something to work with. However, if you decide to implement SQLDescribeParam it could be a used as a starting point. Besides calling SQLDescribeParam, the code also calls SQLDescribeResult.

Another matter I have unfortunately discovered is that the two popular open source databases PostgreSQL and MySQL do not support SQLDescribeParam. PostgreSQL returns unsupported and MySQL just returns VARCHAR for every parameter. But IBM' DB2 and MS SQL server supports SQLDescribeParam. However I have only tested the code with DB2.

Note that DB2 has a buggy install script (it overwrites files in /usr/include). So if you, for some reason, decides to give DB2 a try then call me before installing and I can tell you how to get around the problem.

Greetings,

Mads Lindstrøm

submit.20080530 (5.7 KB) Mads Lindstrøm, 05/30/2008 12:34 PM

History

05/30/2008 12:38 PM - John Goerzen

Hi Mads,

Thank you for the submission here (and earlier in email). I apologize for not having the chance to review it yet; I hope to do so and get back to you next week.

-- John

Also available in: Atom PDF