Skip to main content

I'm trying to use the Dynamic SQL Service (http://www.k2underground.com/groups/dynamic_sql_service_the_original/default.aspx) and am getting an exception on the LIST method.


The exception is "Specified cast is not valid".  I get the exception in the SmartObject Tester and in K2.  If I attach to the K2 Host Server and step through the code the Execute method works fine, it's something internal to K2 that's throwing this exception.


 


Any ideas?

Update: 


 


When I try to use the out-of-the-box SQL Server Service Broker on the List method I get an error saying "unknown object name".  This only occurs with the list methods, all the other methods work fine and read, create and update data the way I would expect.  


I've given the service account datareader and datawriter rights to the database and at one point even gave it dbo rights, still getting the errors.


When I use the Dynamic SQL Service and attach to the K2 Host Server, the code executes fine, I can see it pull the data back form SQL and load the Data Adapter.  The exception is occurring in the xoml.cs file, not in the custom broker.  I can't attach to the included Sql Server Serive broker, but I would assume it's blowing up in the same place.


And, again, this is only with List methods, and it occurs with every table in the database.  We are using SQL 2008.


Any ideas?


I had issues with that service object once we upgraded our server to a specific version of K2 4.5 (can't remember the version number off-hand).  Basically, that service object's LIST method was not compatible once we upgraded so we had to port all of our SmartObject's that consumed that method to the OOB version that ships with the product.  I hope you caught this in dev/staging and not production ;)


Reply