"Invalid Column Name 'MISSING'"- Error while executing block
awaneesh.pandey
Posts: 3
Hello,
We are facing a very weird error while updating a database getting records inserted into the target database. The error we get is " Invalid Column Name 'MISSING'". And the data copy into the target database table fails.
We are using SQL DataCompare 5.2 within our .net environment.
This message is not consistent, so we are not able to trace the error.
We are reading the entire block of the SQL script into various batches so that if a batch (data copy into a table) fails then we continue with the next batch in the block.
Also, we are getting this error while inserting a table having large binary data column which has datatype as ntext
The script with error we are getting is
I do have the error screen with me but i don't have any means to attach with this thread else would have done that.
Please suggest.
Thanks,
-Awaneesh
We are facing a very weird error while updating a database getting records inserted into the target database. The error we get is " Invalid Column Name 'MISSING'". And the data copy into the target database table fails.
We are using SQL DataCompare 5.2 within our .net environment.
This message is not consistent, so we are not able to trace the error.
We are reading the entire block of the SQL script into various batches so that if a batch (data copy into a table) fails then we continue with the next batch in the block.
Also, we are getting this error while inserting a table having large binary data column which has datatype as ntext
The script with error we are getting is
[b]EXEC(N'DECLARE @pv binary(16) '+N'SELECT @pv=TEXTPTR([ReportXml]) FROM [dbo].[cfgReport] WHERE [ReportName]=N''Collateral List by Status/Type'' AND [ReportClassName]=N''rptRetailCollateral'' AND [UserID]=Missing AND [ReportDescription]=Missing AND [SchemaName]=Missing AND [PackageType]=Missing AND [ReportModule]=Missing AND [ReportType]=Missing AND [ReportTypeSub1]=Missing AND [DefaultQuery]=Missing AND [DefaultQueryLink]=Missing AND [DefaultQueryColumn]=Missing AND [DefaultQueryOperator]=Missing AND [QueryRequired]=Missing AND [OrderBy]=Missing AND [MasterSuretyID]=Missing AND [DeleteFlag]=Missing AND (ReportType=''Standard'' or ReportType=''Backup'')[/b]
I do have the error screen with me but i don't have any means to attach with this thread else would have done that.
Please suggest.
Thanks,
-Awaneesh
Comments
If this is happening inside some Toolkit .NET code and not in the commercial (UI) release of the program, we may need to see the code and databases to determine the cause.
It looks like, somehow, the data in the ResultStore is being cast as System.Reflection.Missing.Value instead of SQL Null. That's just a guess on my part, though.
Thanks for your reply.
We got this error while using the Red-Gate toolkit bundle as well as the SQL Datacomapre 5.2. commercial release both. Intially we got the error in the .net code then we tried with the commercial relase & the got the same error. I have the screen shot for the error but i don't have any means to attach the image for the error over here.
As i said that this error occurs only during the update of a DB having a table with 'ntext' datatype. And that to be the fauilre occurs only for insert script not for the update script.
Intially when there is no data into the table then the insert works fine but if we have some data into it & try to synchronize for adding the new data & updating the old data in the target database then this error flashese.
Please let me know some email id so that i can send you the error screen for your reference.
Also the .Net code snippet & the table script in which we are getting error as below:
Code Snippet
Script of the Table
Thanks,
-Awaneesh
Thanks a lot for the scripts. I believe that we understand what makes this happen now, and I think we will need to patch to software to prevent it. On the surface, it looks like an insert containing a row with an ntext field that is set to an empty string has this effect.
Thanks a lot for pointing this out to us. We shall endevor to fix this in a future release.