The Database Migration Wizard does not work for MS SQL Server < 7 because of
the query used to identify autoincrement columns.
The problem is the dependence on the 'sysindexes' relation to indentify
indexes, which do not exists in versions prior to 7.0. The join to
sysindexes is AFAIK superfluous and can be removed. The attaced patch is
works with MSSQL 6.5, but have not been tested on MSSQL 7.0 (but should
work).
BTW, you might want to add a note to the CVS web interface that the tarball
is not directy usable by Visal Studio, because it chokes on the unix text
format in the checked out files.
-Brage
*** frmWizard.frm.orig Thu Jan 23 14:50:09 2003
--- frmWizard.frm Thu Jan 23 14:40:02 2003
***************
*** 1363,1378 ****
'****
'Johnm - MSSQL Autonumber code NOTE: using some of the variables defined for the
Access autonumber code
- 'NOTE: currently only tested on MSSQL Server 7.0/NT4
If optType(2).Value = True Then
'The following query should pull a record that contains the autonumber
column if one exists for the table
! auto_increment_query = "select (syscolumns.status & 128) as isidentity ," & _
! " sysobjects.name as tablename, syscolumns.name as columnname " & _
" From " & _
" sysobjects inner join syscolumns on sysobjects.id = syscolumns.id " & _
! " inner join systypes on syscolumns.xtype = systypes.xtype " & _
! " LEFT OUTER JOIN sysindexkeys on sysindexkeys.id = sysobjects.id and
sysindexkeys.colid = syscolumns.colid " & _
! " LEFT OUTER JOIN sysindexes on sysindexkeys.indid = sysindexes.indid AND
sysindexkeys.id = sysindexes.id " & _
" where sysobjects.type = 'U' AND (syscolumns.status & 128) = 128 AND " & _
" sysobjects.name = '" & auto_increment_table & "'"
--- 1363,1374 ----
'****
'Johnm - MSSQL Autonumber code NOTE: using some of the variables defined for the
Access autonumber code
If optType(2).Value = True Then
'The following query should pull a record that contains the autonumber
column if one exists for the table
! auto_increment_query = " select (syscolumns.status & 128) as isidentity ,
sysobjects.name as tablename, syscolumns.name as columnname " & _
" From " & _
" sysobjects inner join syscolumns on sysobjects.id = syscolumns.id " & _
! " inner join systypes on syscolumns.type = systypes.type " & _
" where sysobjects.type = 'U' AND (syscolumns.status & 128) = 128 AND " & _
" sysobjects.name = '" & auto_increment_table & "'"
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]