I've got an issue trying to do an INSERT INTO command from Access 2003 to a SQL server 2000 Database. All the 'temp' tables are Access tables and All others are SQL tables.
If I used the db.excute with dbfailerror I get an ODBC--Failed error.
If I use the following DoCmd.RunSQL I get the 'Can't append' error.
The First command will run, but the reset won't with key violations - but there are no key violations. If I wait for a period of time and switch the order then the one that ran previously won't and the new first one will.
Any help would be greatly appreciated. Below is my current code
intQuoteID = 354
DoCmd.RunSQL ("INSERT INTO dbo_Quote SELECT * FROM dbo_Quote_Temp WHERE QuoteID = " & intQuoteID & ";"), dbSeeChanges
DoCmd.RunSQL ("INSERT INTO dbo_QuoteDetail SELECT * FROM dbo_QuoteDetail_Temp WHERE QuoteID = " & intQuoteID & ";"), dbSeeChanges
DoCmd.RunSQL ("INSERT INTO dbo_QuoteSubRouting SELECT * FROM dbo_QuoteSubRouting_Temp WHERE QuoteID = " & intQuoteID & ";"), dbSeeChanges
DoCmd.RunSQL ("INSERT INTO dbo_QuoteRouting SELECT * FROM dbo_QuoteRouting_Temp WHERE QuoteID = " & intQuoteID & ";"), dbSeeChanges
DoCmd.RunSQL ("INSERT INTO dbo_QuoteGradeMakeup SELECT * FROM dbo_QuoteGradeMakeup_Temp WHERE QuoteID = " & intQuoteID & ";"), dbSeeChanges
DoCmd.RunSQL ("INSERT INTO dbo_QuoteQty SELECT * FROM dbo_QuoteQty_Temp WHERE QuoteID = " & intQuoteID & ";"), dbSeeChanges
If I used the db.excute with dbfailerror I get an ODBC--Failed error.
If I use the following DoCmd.RunSQL I get the 'Can't append' error.
The First command will run, but the reset won't with key violations - but there are no key violations. If I wait for a period of time and switch the order then the one that ran previously won't and the new first one will.
Any help would be greatly appreciated. Below is my current code
intQuoteID = 354
DoCmd.RunSQL ("INSERT INTO dbo_Quote SELECT * FROM dbo_Quote_Temp WHERE QuoteID = " & intQuoteID & ";"), dbSeeChanges
DoCmd.RunSQL ("INSERT INTO dbo_QuoteDetail SELECT * FROM dbo_QuoteDetail_Temp WHERE QuoteID = " & intQuoteID & ";"), dbSeeChanges
DoCmd.RunSQL ("INSERT INTO dbo_QuoteSubRouting SELECT * FROM dbo_QuoteSubRouting_Temp WHERE QuoteID = " & intQuoteID & ";"), dbSeeChanges
DoCmd.RunSQL ("INSERT INTO dbo_QuoteRouting SELECT * FROM dbo_QuoteRouting_Temp WHERE QuoteID = " & intQuoteID & ";"), dbSeeChanges
DoCmd.RunSQL ("INSERT INTO dbo_QuoteGradeMakeup SELECT * FROM dbo_QuoteGradeMakeup_Temp WHERE QuoteID = " & intQuoteID & ";"), dbSeeChanges
DoCmd.RunSQL ("INSERT INTO dbo_QuoteQty SELECT * FROM dbo_QuoteQty_Temp WHERE QuoteID = " & intQuoteID & ";"), dbSeeChanges