View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
05063 | Bug reports | Import/Export | public | 2011-03-28 12:19 | 2011-07-22 16:23 |
Reporter | Assigned To | c_schmitz | |||
Priority | normal | Severity | partial_block | ||
Status | closed | Resolution | fixed | ||
Product Version | 1.90+ | ||||
Fixed in Version | 1.91+ | ||||
Summary | 05063: Import fails on MSSQL 2008 | ||||
Description | Import failed with message: | ||||
Steps To Reproduce | Repeatable with any survey being exported from a linux system and into a Windows system with MSSQL 2008. Have tested it with both our systems and it appears to be repeatable. | ||||
Additional Information | Tracked issue down to importsurvey.php under Import surveys table The startdate was set to 0 in the query. I changed this to set it to null instead and the import worked fine. This, I believe, is due to a change in how MSSQL 2008 handles dates though I could be wrong. | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
Bug heat | 6 | ||||
Complete LimeSurvey version number (& build) | 9642 | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | Firefox 3.6 / Firefox 4 | ||||
Database type & version | Mysql 5.0.26 on export and MSSQL 2008 on import | ||||
Server OS (if known) | Export:SLES10SP3 (2.6.16.60-0.77.1-smp), Import: Windows Server 2003 R2 Standard x64 Edition Service Pack 2 | ||||
Webserver software & version (if known) | Export: Apache 2.2, Import:IIS6 | ||||
PHP Version | Export:5.3.6 , Import:5.3.6 | ||||
Which mssql driver are you using in config.php? |
|
The odbc_mssql driver. |
|
Sorry, can't reproduce. When I export the startdate is empty here. I guess for some reason there is a 0 in your mysql DB in the startdate field. Can you check? |
|
lisnalinchy, please give feedback or we will have to close this issue. |
|
My apologies, I have just returned from annual leave. Just had a look in the lime_surveys table - startdate is set to NULL across the board bar one which has an actual start date of 2010-11-23 00:00:00 |
|
lisnalinchy, I don't understand - either the startdate is set to NULL or it is set to 2010-11-23 00:00:00 ? |
|
There are 15 surveys - all the surveys in the table with the exception of one have a start date of NULL. There is only one survey in the table with an actual start date. |
|
So when you export such a survey with a startdate of NULL in the DB then the export file contains a 0 instead? Can you attach such a file? What driver are you using, mysql or mysqli on server? |
|
I can replicate this if, on the linux/mysql box I set a start date for the survey and then try to import it into the windows/MSSQL box. The error on import into the Windows/MSSQL box is: Error: Failed to insert data I have uploaded the LSS file I used for import as requested. I am using the mysql driver on the Linux server. If I do not specify a start date, the import works fine. If I do specify a start date, I get the error. Looking at the importsurvey.php script, it actually sets the start date to 0 rather than NULL which (as you can see from the error) does not work. This is actually a documented issue with MSSQL 2008 and above. |
|
Correct to the above feedback: It does not matter if I specify a start date or not, I still get this error. I had forgotten to remove my fix before testing. Returning the original importsurvey.php file results in this error being generated every time. |
|
I can import the attached file just fine on my MSSQL 2008 server with LimeSurvey 1.90 (9642) |
|
Version is reporting as: Version 1.90+ Build 9642 on both servers. I will try creating a new instance of Limesurvey on our Windows/MSSQL box and test the import. |
|
Please do. Maybe the installation on the server was updated in the past and not allf iles were properly replaced with new versions. |
|
lisnalinchy, I too have MSSQL2008 (R2) and have discovered that more than just this one table have NO default values set. Can you confirm if any default values are set in any tables and if any identity parameters have been set? In MSMS you can open columns, right click and choose modify. Then scroll through the properties. The default value should be set there and if an identity is required it will be set to Yes and 1 and 1. Thanks! |
|
medicnick, this is not a problem of neither a missing default value nor missing identity. Please don't interfere. |
|
I must apologies that I have not yet managed to get round to this. I am currently snowed under with other work. I will be doing this on Monday. |
|
I have built a new Limesurvey/Windows/MSSQL box and the issue appears to have gone. It looks like the issue was due to some files that had not been updated during that last update. For reference, I had used the web based in-line upgrade. I will probably do this by hand in future. Many thanks for all your help and time. |
|
There is still an issue here. I have just clean installed the latest version on both our linux and windows boxes. Testing an import, the import fails with the same error. Both version are identical except one is running on linux with MySQL and the other is running on Windows Server 2008R2 (iis 7.5) with MSSQL 2008R2. A simple fix is to insert: As far as I understand, startdate is supposed to be set to null anyway for an import. No harm in reinforcing it and it resolves the issue. |
|
I am sorry but by now your version is old. Please update to 1.91+ and see if the issue is resolved there. Feel free to re-open this if you can still reproduce it. |
|
Apologies, perhaps I was not very clear. In my comment I referred to the latest version - I should have been more specific and said '1.91+' - the latest available stable release as of today - is the one I am using. There does not appear to be any way to change the 'Product version' in the details table above i'm afraid. Do you want me to re-open this as a new report? |
|
Even though I cannot reproduce the issue at all I put in a similar fix now for the .lss import. |
|
New 1.91+ version released |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2011-03-28 12:19 |
|
New Issue | |
2011-03-29 19:56 | c_schmitz | Note Added: 14606 | |
2011-03-29 19:56 | c_schmitz | Assigned To | => c_schmitz |
2011-03-29 19:56 | c_schmitz | Status | new => feedback |
2011-03-30 10:23 |
|
Note Added: 14618 | |
2011-03-30 10:23 |
|
Status | feedback => assigned |
2011-04-04 12:57 | c_schmitz | Note Added: 14650 | |
2011-04-04 12:57 | c_schmitz | Status | assigned => feedback |
2011-04-11 13:43 | c_schmitz | Note Added: 14776 | |
2011-04-11 13:50 |
|
Note Added: 14777 | |
2011-04-11 13:50 |
|
Status | feedback => assigned |
2011-04-11 14:11 | c_schmitz | Note Added: 14781 | |
2011-04-11 14:13 | c_schmitz | Status | assigned => feedback |
2011-04-11 14:54 |
|
Note Added: 14782 | |
2011-04-11 14:54 |
|
Status | feedback => assigned |
2011-04-11 17:33 | c_schmitz | Note Added: 14783 | |
2011-04-11 18:51 | c_schmitz | Status | assigned => feedback |
2011-04-12 10:36 |
|
Note Added: 14789 | |
2011-04-12 10:36 |
|
Status | feedback => assigned |
2011-04-12 10:36 |
|
File Added: limesurvey_survey_33397(1).lss | |
2011-04-12 10:41 |
|
Note Added: 14791 | |
2011-04-12 12:12 | c_schmitz | Note Added: 14792 | |
2011-04-12 12:25 | c_schmitz | Status | assigned => feedback |
2011-04-12 12:43 |
|
Note Added: 14793 | |
2011-04-12 12:43 |
|
Status | feedback => assigned |
2011-04-12 13:29 | c_schmitz | Note Added: 14794 | |
2011-04-12 15:24 | c_schmitz | Relationship added | related to 04965 |
2011-04-12 15:25 | c_schmitz | Relationship deleted | related to 04965 |
2011-04-13 07:06 | medicnick | Note Added: 14807 | |
2011-04-13 16:46 | c_schmitz | Note Added: 14812 | |
2011-04-15 08:50 |
|
Note Added: 14819 | |
2011-04-19 13:33 |
|
Note Added: 14844 | |
2011-04-19 16:02 | c_schmitz | Status | assigned => closed |
2011-04-19 16:02 | c_schmitz | Resolution | open => unable to reproduce |
2011-07-19 16:58 |
|
Note Added: 15799 | |
2011-07-19 16:58 |
|
Status | closed => feedback |
2011-07-19 16:58 |
|
Resolution | unable to reproduce => reopened |
2011-07-19 17:08 | c_schmitz | Note Added: 15801 | |
2011-07-19 17:08 | c_schmitz | Status | feedback => closed |
2011-07-19 17:08 | c_schmitz | Resolution | reopened => unable to reproduce |
2011-07-19 17:18 |
|
Note Added: 15804 | |
2011-07-19 17:18 |
|
Status | closed => feedback |
2011-07-19 17:18 |
|
Resolution | unable to reproduce => reopened |
2011-07-21 18:18 | c_schmitz | Note Added: 15820 | |
2011-07-21 18:18 | c_schmitz | Status | feedback => resolved |
2011-07-21 18:18 | c_schmitz | Fixed in Version | => 1.91+ |
2011-07-21 18:18 | c_schmitz | Resolution | reopened => fixed |
2011-07-22 16:23 | c_schmitz | Note Added: 15831 | |
2011-07-22 16:23 | c_schmitz | Status | resolved => closed |