New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MIssing Columns for XML Export Requiring Not Null #8
Comments
Turning off constraint to saving tables and allowing nulls in both fields, yields the following error when attempting to create a new survey: The INSERT statement conflicted with the FOREIGN KEY constraint "FK_vts_tbSurvey_vts_tbNotificationMode". The conflict occurred in database "surveyproject", table "dbo.vts_tbNotificationMode", column 'NotificationModeID'. |
The same problem does not occur in local copies running on SQL Express and IIS |
Thank you for reporting. This and similar issues (e.g. export a question from a library to xml and next import question into survey --> insert null value error) seem related to the working of either Mssqlserver 2014 or the latest .NET version (4.6). Previously (as you noticed on Sql express - what version?) the issue did not exist. Any suggestions to fix this are most welcome. |
Exploring this so far, for the XML import, the answer appears to be that Microsoft dropped "Smart Defaults" from the Web Deployment choices. That function would enter a default value in columns specified with NOT NULL. For the code, it looks like "default" needs to be added for those columns to the insert query when creating a new survey. |
I added this code: I can't delete surveys so now that I have web deploy working, I don't have a way to test an empty database. |
Findings so far:
|
The survey export from both 2.3 and 2.1 does not include (vts_Survey) FolderId and DefaultSurvey in the exported XML. Both columns are defined as "not null" so the import into 2.3 fails. Saving a new survey also fails with the same error: Cannot insert the value NULL into column 'FolderId', table 'surveyproject.dbo.vts_tbSurvey'; column does not allow nulls. INSERT fails.
The text was updated successfully, but these errors were encountered: