Skip to main content

Hi,


I am using K2 Blackpearl in a web application. I have added a SqlDatSource in a WebPage, and I have chosen the procedure LoadWorklistItem for the SELECT statement. However, when I click on "Test Query" at the end of the SqlDataSource configuration, I have the following exception:


There was an error executing the query. Please check the syntax of the command and if present, the types and values of the parameters and ensure they are correct.


Server Exception: String was not recognized as a valid DateTime. Couldn't store <24.09.2007 13:59:05> in StartDate Column. Expected type is DateTime.


I have tried to deploy my process again, but it doesn't change anything.


Does somebody have a solution ?


 Thanks,


eraim

I have a similar unresolved issue with DateTime conversion. Basically, my SmartBox field is a DateTime and creating a new "Instance" is fine, but the "Load" method fails. It's almost as if the server is trying to convert the DateString into a DateTime but failing due to an “en-US” regional compatibility.


Here is my setup:


1. 1 Server with K2, SQL and all the WWW components installed


2. SQL Server accounts all "British English"


3. K2 Service Account regional settings set to “en-GB”


Anybody seen this error as well and any workarounds available


Cheers


 


I am experiencing the same issue. My configuration is the same as yours punkas, although I think its worth mentioning that our SQL Server instance is set to English (United States), which is something we can't seem to change. I would be interested to know whether its the same for you.

Currently I know of no workaround, but there is a K2 consultant currently trying to assist us with the problem.
 


I had the same error when trying to join a process instance and a smartobject using a sqldatasource.  My workaround was to join the process instance to the process instance data to the smartobject where the process instance data field name was '<smartobject id>'.  Don't know if that actually helps anybody...
Ran into this issue again today.  Found out it has something to do with Date data fields where "Is Empty Date" is checked.  I just changed the data type to string and the error went away.

Hi,


What's happening is that K2 will set the datafield to "0001/01/01" which is not valid in SQL. We have put through an enhancement request and it will be looked at with a future release. The workaround will be not to use blank date when you're getting this error.


Regards


Gert


Gert, et. al.,


The problem here is loading an existing date from the SmartBox into a SmartObject. The date (valid in the DB) cannot be converted. As some point it seems the date gets converted from the default DB en-US type to some localized type and I get this error when trying to Load the SmartObject:


{"Server Exception: String was not recognized as a valid DateTime.Couldn't store <18/12/2007 11.34.57> in DateOfRequest Column.  Expected type is DateTime."}


The conversion can only take place at the point where the K2 server connects and loads the data from the SmartBox. We've set the server's regional settings to en-US. What else should I check to ensure that the date gets selected in the correct format?


Regards, Gabriel


We fixed this problem by logging in as the BP service account user and setting the regional settings for that user to en-US.

We have the same issue and setting BPService user regional setttigns to en-US did not solve the issue. Is regional options different from en_US supported by K2 ?


Reply