steino / odbc

Automatically exported from code.google.com/p/odbc
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

SQLDescribeParam: {07009} [Microsoft][ODBC SQL Server Driver]Invalid parameter number #30

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. go run test.go -mssrv=W -msdb=X -msuser=Y -mspass=Z
2. fails on line:
stmUpsertUser, err = db.Prepare("EXEC [dbo].[test_test] ?")

What do you see instead?
panic: SQLDescribeParam: {07009} [Microsoft][ODBC SQL Server Driver]Invalid 
parameter number

Windows 7 x64, SQL Server 2008 & 2012, Go 1.2

Original issue reported on code.google.com by gov...@ver.slu.is on 20 Jan 2014 at 1:31

Attachments:

GoogleCodeExporter commented 9 years ago
I am very busy now. I will look into it as soon as I can. Thank you.

Alex

Original comment by alex.bra...@gmail.com on 21 Jan 2014 at 1:52

GoogleCodeExporter commented 9 years ago
Understood, thank you, your work is much appreciated.
The server you have previously used for testing is still accessible and will 
continue to be so, should you need it.

Govert

Original comment by gov...@ver.slu.is on 21 Jan 2014 at 10:57

GoogleCodeExporter commented 9 years ago
Thank you. But I have access to MS SQL Server 2008.

Alex

Original comment by alex.bra...@gmail.com on 21 Jan 2014 at 11:03

GoogleCodeExporter commented 9 years ago
I suspect you are not running latest version. What does your "hg id" command 
prints?

In your example it would be impossible sometime to describe input parameter. So 
I wouldn't be surprised if SQLDescribeParam fails. But my latest version does 
not rely on SQLDescribeParam to succeed.

Alex

Original comment by alex.bra...@gmail.com on 22 Jan 2014 at 1:30

GoogleCodeExporter commented 9 years ago
Your suspicion was absolutely correct.

I have it setup to automatically fetch latest versions of dependencies, but my 
hg version was outdated (2.7) and wouldn't play nice with google's certificates 
anymore.  Errors were being silently swallowed.
An update solved it.

I do apologize for wasting your time, I hope it wasn't too much of an 
inconvenience for you.

Thank you once again.

Original comment by gov...@ver.slu.is on 23 Jan 2014 at 9:30

GoogleCodeExporter commented 9 years ago
No problem.

Alex

Original comment by alex.bra...@gmail.com on 23 Jan 2014 at 11:31