Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQLDescribeParam Errors #19

Closed
GoogleCodeExporter opened this issue Jun 15, 2015 · 3 comments
Closed

SQLDescribeParam Errors #19

GoogleCodeExporter opened this issue Jun 15, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Execute a merge statement like the following on Windows using SQL Server 
2008:
merge tblName
using (select ? as Id, ? as Name) as source
ON tblName.Id = source.Id
WHEN MATCHED THEN
update tblName.Name = source.Name
WHEN NOT MATCHED BY TARGET THEN
insert (name) into tblName(source.Name);

What is the expected output? What do you see instead?
Expected - the SQL statement execute correctly
Actual - DIAG [07009] [Microsoft][SQL Server Native Client 11.0]Invalid 
Descriptor Index (0) 

In this case, the call to SQLNumParams correctly returns 2 but it appears that 
SQLDescribeParam does not work to describe all parameters.  See 
http://msdn.microsoft.com/en-us/library/ms709448.aspx

If I make a change to ExtractParameters to ignore errors returned by 
SQLDescribeParam then the merge statement works correctly.  I think this 
work-around should work because SQLDescribeParam is not even implemented by 
freedts.

Original issue reported on code.google.com by lukemaul...@gmail.com on 28 Aug 2013 at 3:32

@GoogleCodeExporter
Copy link
Author

I agree, I think solution will be similar to Issue 14. I will try and fix them 
together.

Alex

Original comment by alex.bra...@gmail.com on 30 Aug 2013 at 6:34

  • Changed state: Accepted

@GoogleCodeExporter
Copy link
Author

Please, review https://codereview.appspot.com/13454045/

Alex

Original comment by alex.bra...@gmail.com on 5 Sep 2013 at 5:48

  • Changed state: Started

@GoogleCodeExporter
Copy link
Author

This issue was closed by revision d64013ec9967.

Original comment by alex.bra...@gmail.com on 13 Sep 2013 at 2:09

  • Changed state: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant