Updates not working - invalid syntax

Postby 1DMF » Thu May 03, 2012 10:20 am

I have just had to restore a table from a backup by importing the table as our server support people are incompetent and not backing it up properly nor know how to restore SQL.

So I hoped after importing the table, DbSchema would fix the problems, recreate keys , relationships etc, only it doesn't

It fails with errors and doesn't make required changes to the DB.

here is the error
java.sql.SQLException: Incorrect syntax near the keyword 'IDENTITY'.


Perhaps this is related to the 'Mandatory - not null' bug?

Thanks,
1DMF
1DMF
 
Posts: 17
Joined: Tue May 01, 2012 2:00 pm
 

Re: Updates not working - invalid syntax

Postby donose.mihai » Thu May 03, 2012 12:48 pm

A beta update will be available tomorrow, if you can please post the full query that dbschema is trying to execute, hope it's the same issue for null / not null.
donose.mihai
 
Posts: 354
Joined: Thu Apr 07, 2011 11:05 am
 

Re: Updates not working - invalid syntax

Postby 1DMF » Tue May 08, 2012 11:19 am

There still seems to be updating problems. (having updated with the latest patch)

I am not able to modify the datatype of a PK.

I had to go to SQL Studio Manager and make the change as DbSchema kept moaning ....
ALTER TABLE ALTER COLUMN Packager failed because one or more objects access this column. The object 'PK_Packagers' is dependent on column 'Packager'.


Also it is still erroring when trying to make alterations to an Identity column with
Incorrect syntax near the keyword 'IDENTITY'.
1DMF
 
Posts: 17
Joined: Tue May 01, 2012 2:00 pm
 

Re: Updates not working - invalid syntax

Postby donose.mihai » Mon May 14, 2012 7:09 am

Can you please generate a table or two that you're having problem with and post what columns are you having problems with?

Thanks
donose.mihai
 
Posts: 354
Joined: Thu Apr 07, 2011 11:05 am
 

Re: Updates not working - invalid syntax

Postby 1DMF » Wed May 16, 2012 9:23 am

You can't even edit a PK that is auto increment and change it to no longer be an IDENTITY, the option is ghosted out?

This is on ANY table, do you not have SQL to try it yourself?
1DMF
 
Posts: 17
Joined: Tue May 01, 2012 2:00 pm
 

Re: Updates not working - invalid syntax

Postby donose.mihai » Wed May 16, 2012 9:45 am

We do have but it worked for us.

Update to the latest beta, some changes has been made for the autoincrement option (PK).
donose.mihai
 
Posts: 354
Joined: Thu Apr 07, 2011 11:05 am
 

Re: Updates not working - invalid syntax

Postby 1DMF » Wed May 16, 2012 10:56 am

Hi,

I have the latest version, the option to remove auto increment is ghosted when editing a PK Identity column?

Edit -> Just a thought, is it because I have to drop the PK_Index before I can alter the column.

I just found I couldn't alter a PK datatype from nvarchar to varchar or change its size constraint, with a message that other places were dependent on this column.

I deleted the PK Index and removed the PK against the colum, I was then able to make the required changes, then I set the PK back and it auto generated another PK_Index.
1DMF
 
Posts: 17
Joined: Tue May 01, 2012 2:00 pm
 

Re: Updates not working - invalid syntax

Postby donose.mihai » Fri May 18, 2012 8:45 am

I'll create a ticket for our developers maybe they can put an advice.
donose.mihai
 
Posts: 354
Joined: Thu Apr 07, 2011 11:05 am
 

Re: Updates not working - invalid syntax

Postby albertstien3329 » Tue Jan 01, 2013 10:03 am

SERIAL columns create as SERIAL but with default value, also created sequence for table
jacket leather jacket leather
biker chaps biker chaps
western leather chaps western leather chaps
black leather jacket women black leather jacket women
albertstien3329
 
Posts: 1
Joined: Tue Jan 01, 2013 10:00 am
 

Return to DbSchema Issues

cron