Toad World® Forums

Toad for SQL Server Beta 6.6.0.920 - Problem with new Data generator option


#1

I have a simple table :

CREATE TABLE [dbo].[ImageTable] (

[CONTA] int IDENTITY(1, 1) NOT NULL,

[IMG] image NULL,

[DATA] date NULL,

CONSTRAINT [PK__ImageTab__FCAB690825404DD1]

PRIMARY KEY CLUSTERED ([CONTA] ASC)

WITH ( PAD_INDEX = OFF,

FILLFACTOR = 100,

IGNORE_DUP_KEY = OFF,

STATISTICS_NORECOMPUTE = OFF,

ALLOW_ROW_LOCKS = ON,

ALLOW_PAGE_LOCKS = ON,

DATA_COMPRESSION = NONE )

ON [PRIMARY]

)

ON [PRIMARY]

TEXTIMAGE_ON [PRIMARY];

and with new option I try to generate datas for test. I connect to DB and table without problem.

See my screenshot in attach with error :

data_gen.jpeg

I want generate 1000 records to test. I generate these records directly in the table but I obtain an error as you can see from my screenshot.

The problem is that this table contain a field - CONTA - of type autoincrement. This table still contains about 20 records. Conta is primary key of table.

Before start to generate test data I select option to empty the table, to avoid to generate a double primary key.

But the problem still remain. Your tool try to generate test data with value for field CONTA that start from 1 and end to 1000.

Table is empty but option IDENTITY_INSERT if OFF and you can’t insert a value for this field.

When you generate test data for a field that contains an autoincrement field you must set IDENTITY_INSERT ON , insert a correct value from 21,22,23,24,etc,etc, and after set iDENTITY_INSERT OFF.

I stay tune for your consideration.

Best regards,

Sergio


#2

Hi Sergio,

This is a bug, we put the script SET IDENTITY_INSERT dbo.ImageTable ON into the wrong place.

for now,you can search the script and move it before the transaction begin,

We will fix it as soon as possible, next beta this issue will be solved!

Thanks,

Cathy.


#3

Hi Cathy,

many thank’s for your support.

Ok. I test it in a new beta version of TOAD SS 6.6.

Best regards,

Sergio