Project

General

Profile

Bug #2736

import from other db fails with ordering and when tables aren't there

Added by Michael Lee almost 13 years ago. Updated almost 13 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
EntryDB
Target version:
Start date:
01/19/2007
Due date:
% Done:

0%

Estimated time:
Bugzilla-Id:
2736

Description

The following code helps fix this:

If Not .BOF Then .MovePrevious
Do Until .BOF Or .EOF
'go from that db into this one
Dim strThisTableName As String
strThisTableName = !TableName
Debug.Print "adding to " & strThisTableName
If TblExistInDB(strThisTableName, strDBLoc) Then
'table doesn't exist- is it critical?
If !skippableTable Then
Debug.Print "importFromOtherDB>> skipped skippable table: " & strThisTableName
'do I need to repopulate it?
Select Case strThisTableName
Case "OneNullRec", "cvs_entry_options", "backupOptions"
Dim rstAddOne As New ADODB.Recordset
rstAddOne.Open strThisTableName, CurrentProject.Connection, adOpenForwardOnly, adLockOptimistic, adCmdTable
rstAddOne.AddNew
rstAddOne.Update
rstAddOne.Close
End Select 'repopulate with one rec
Else
'not skippable
MsgBox "The database you selected is missing a required table: " & strThisTableName & " Import failed. This database can be deleted.", vbCritical, CON_APP_TITLE
End If
Else
DoCmd.RunSQL "INSERT INTO [" & strThisTableName & "] SELECT * FROM [" & strThisTableName & "] IN " & strDBLoc_SQL & ";"
End If

but also need to add error trapping and list of skippable tables:
backupOptions
classContributor
commClass
commConcept
commCorrelation
commInterpretation
commName
commStatus
commUsage
cust_cvs_SoilDepth
disturbanceObs
entry_NewPlots
entryErr_cover
entryErr_plotData
entryErr_plots_cover
entryErr_plots_stems
entryErr_stems
errChk_embeddedErrs
errorChk_SQL
firstUserPicklistExamples
HerbData
logicalErrorRegistry
note
noteLink
observationContributor
OneNullRec
place
plantConcept
plantCorrelation
plantLineage
plantName
plantStatus
plantUsage
projectContributor
sas_temp_combineBigTree
sas_temp_MATCHMOD
soilObs
soilTaxon
stemCount
stemLocation
stratum
summary_CommConcept
taxonAlt
taxonImportance
taxonInterpretation
taxonObservation
temp_taxonAlt_config
TreeDataBig
TreeDataSml
user_Entry
vmd_plots
W_BrowsedFiles
graphic
observationSynonym
address
commLineage
definedValue
embargo
referenceAltIdent
referenceContributor
referenceJournal
referenceParty
telephone
userDefined
namedPlaceCorrelation

History

#1 Updated by Michael Lee almost 13 years ago

fixed in v204p8 on bioark and my computer.

#2 Updated by Redmine Admin over 6 years ago

Original Bugzilla ID was 2736

Also available in: Atom PDF