05-15-2012 03:22 AM
I get the same error when calling a stored procedure on a SQL Server 2008 R2 database (in the development environment, didn't test executable). When changing the CommandType in NI_Database_API.lvlib: DB Tools Create Parameterized Query.vi back to adCmdUnknown when input stored procedure is true solved the problem for me. See below the difference between LV2010 SP1 and LV2011 SP1 in the attachments.
05-15-2012 07:37 AM
Dek2, thanks for sharing this. This could be big for me in this project, as every time I use the old database connectivity toolkit, I have problems building installers. I'll give this a shot with the 2011 toolkit.
05-15-2012 08:37 AM
Hi PiMaster. Finally for my application I don't need to patch the database connectivity toolkit at all. Instead, I set the 'stored procedure?' input to false to make it work again. When setting the input to false, the CommandType is set to adCmdText. The adCmdUnknown CommandType resolved to adCmdText in LV2010SP1. See http://msdn.microsoft.com/en-us/library/windows/desktop/ms675946%28v=vs.85%29.aspx. It seems that a fix in LV2011SP1 (http://digital.ni.com/public.nsf/websearch/43B2E4839C87B1C3862578B500130856?OpenDocument, id 240787) revealed a bug in our applications.
05-17-2012 07:51 AM
Yeah, now my program works with the 2011 toolkit in the executable as well. I still can't build a working installer when I use anything from the toolkit, but that's another problem to track down.