Patch applied with minor changes (you might want to get the latest version) - thanks again.
If anyone can test this on SQL 2000 it would be appreciated... Regards, Dave. > -----Original Message----- > From: John McCawley [mailto:[EMAIL PROTECTED]] > Sent: 12 June 2002 17:41 > To: Dave Page > Cc: pgadmin-hackers > Subject: Re: [pgadmin-hackers] Patch file for table drop on import > > > > >An attachment to the list would be great thanks. > > > > > Attached is a patch for frmWizard.frm in the pgMigration project. It > implements the following: > > 1) Adds a checkbox to the wizard for "Drop any existing > destination tables" > 2) If this box is checked, it uses the schema object to determine the > existance of the imported table in the destination Postgres > DB, and adds > a drop table statement before the create table statement > 3) Minor modification to the existing MS Access autonumber > code to allow > me to reuse it for MS SQL > 3) If the source DB type is MS SQL, it runs a query on the source > database to find the autonumber field, if found it sets variables to > allow the existing autonumber code to add the sequence > 4) If the "drop existing" checkbox is checked, it will drop existing > sequence names that conflict with the ones that are being created > 5) Added text to the status window to notify user of dropped > tables, and > created and dropped sequences. > > NOTE: Due to an apparent name length limitation in the schema > object, I > was only able to compare up to 31 characters of the > destination sequence > name. If the first 31 characters match, I assume it to have > the same name > > NOTE: The SQL Server autonumber query has only been tested on > SQL Server > 7.0. I am unable to test its validity in 6.5 or SQL Server 2000. > > John > > > ---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly