The value '' cannot be inserted into column IctHeaderId Erro

The simplest way to populate your database with test data.

Moderators: David Atkinson, Anu Deshpande, Lionel

The value '' cannot be inserted into column IctHeaderId Erro

Postby aharbath » Mon Nov 23, 2009 6:49 pm

I am evaluating the Data Generator tool and I am getting this error when with one of the tables I am loading. Any ideas on why this is appearing. Additional details are below:

The value '' cannot be inserted into column IctHeaderId
RedGate.SQLDataGenerator.Engine.DataGeneration.InvalidColumnDataException: The value '' cannot be inserted
into column IctHeaderId at u.c() at u.Read() at
RedGate.SQLDataGenerator.Engine.DataGeneration.TypeTranslationDataReader.Read() at
System.Data.SqlClient.SqlBulkCopy.ReadFromRowSource() at
System.Data.SqlClient.SqlBulkCopy.WriteToServerInternal() at
System.Data.SqlClient.SqlBulkCopy.WriteRowSourceToServer(Int32 columnCount) at
System.Data.SqlClient.SqlBulkCopy.WriteToServer(IDataReader reader) at az.a(CancellableController , Int32 ,
Int32 , ConnectionProperties , GenerateAction , SqlConnection , SDGProject , GenerationReport )
aharbath
 
Posts: 3
Joined: Mon Nov 23, 2009 6:43 pm

Postby Matthew Flatt » Tue Nov 24, 2009 8:28 pm

Hi aharbath,

Are you populating this table from another Database/Table by any chance? It looks as though SQL Data Generator might be trying to put blank data into a column which doesn't allow blank data. If this is from an existing Database/Table can you check to see if it has any blank rows for that column?

Thanks,
Matthew Flatt
Test Engineer, HyperBac
Matthew Flatt
 
Posts: 253
Joined: Tue Jan 15, 2008 4:45 pm

Postby aharbath » Tue Nov 24, 2009 8:34 pm

I am not populating the data from another table. I am letting Data Generator do its' thing. The column IctHeaderId does not allow nulls and in the generator parameters for the IctHeaderId colmun the Allow Null Values checkbox is not checked.
aharbath
 
Posts: 3
Joined: Mon Nov 23, 2009 6:43 pm

Postby Matthew Flatt » Wed Nov 25, 2009 7:47 pm

Hi again,

Do you think it would be possible to provide us with a binary schema snapshot of the database so we can try to recreate here? You can use SQL Compare or the tool here to take your snapshot. If you could then e-mail it to support@red-gate.com with reference number F0028994 that would be great.
Matthew Flatt
Test Engineer, HyperBac
Matthew Flatt
 
Posts: 253
Joined: Tue Jan 15, 2008 4:45 pm

Postby aharbath » Wed Nov 25, 2009 9:20 pm

I was eventually able to get the table populated with the number of records that I needed. It just took restarting the load a number of times. A little annoying but got me where I needed to be.
aharbath
 
Posts: 3
Joined: Mon Nov 23, 2009 6:43 pm

Postby Matthew Flatt » Thu Nov 26, 2009 9:41 pm

Thank you for the update, if you want to send over the schema to help us try to track down the problem anyway that would be great.
Matthew Flatt
Test Engineer, HyperBac
Matthew Flatt
 
Posts: 253
Joined: Tue Jan 15, 2008 4:45 pm


Return to SQL Data Generator 1

Who is online

Users browsing this forum: No registered users and 0 guests

cron