Unable to create a new dataset/Managed Key

Installation Forum (Inactive)
Unable to create a new dataset/Managed Key marie_selsky  2012-12-19 13:20
Status: Closed
 
I have been unable to create new dataset/managed key in Labkey version 12.2
I am attaching the error log and a screen shot of the error. we used to be able to do this in 12.1.
any suggestions on how to resolve this issue.
thanks,
Marie
 
 
Matthew Bellew responded:  2012-12-19 13:58
First, thanks for the very good bug report. Here is the offending sql statement from the log

    UPDATE studydataset."c148d201_test1" SET lsid = ? + participantid + '.' + (10000 * DATEPART(year, date)) + (100 * DATEPART(month, date)) + (DATEPART(day, date)) + '.' + COALESCE(_key,'')

It would appear that SQL Server is interpreting the "+" here as "add two numbers" instead of "concatenate two strings". This code doesn't appear to have changed. Can you tell me what version of SQL server you are using, and if it has changed recently?

I will try to reproduce the error here.

Matt
 
Matthew Bellew responded:  2012-12-19 15:08
I can reproduce this error for data-based studies on SQL Server. You will not see the error for visit-based studies or if the dataset is empty. It may be a new error, but I think may have just been lucky.

There is now a bug logged for this.

https://www.labkey.org/issues/home/Developer/issues/details.view?issueId=16845

Matt
 
Matthew Bellew responded:  2012-12-21 12:37
A fix for this has been committed to the 12.3 release. Until you upgrade, the options are to a) delete and recreate the dataset or b) delete all the rows, make your schema updates, then reload.

Sorry for the inconvenience.
Matt
 
Matthew Bellew responded:  2012-12-21 14:03
In response to your e-mail.

When you are ready to upgrade, contact us, and we will make sure you have the right build. Note, that the pre-built installers will only upgrade installations created with previous versions of the installer. If you are running SQL Server that means at least part of the install was done manually (the installer uses postgres).

There are instructions for doing a manual upgrade here.

https://www.labkey.org/wiki/home/Documentation/page.view?name=manupgrade

Please feel free to ask for help here, if any part of this is confusing or does not work.

Matt