I'm having issues attempting to open a Microsoft SQL table, where the same code has been used in the past without any issues. The error is "Error 3622 Open SQL Server Table with Identity Column." Any assistance would be greatly appreciated.
Code:
Dim dbs As DAO.Database
Dim rst_AllText_Credits As DAO.Recordset
Dim rst_AllText_SQL_Format_Compare_SQL_Table_Credit_Memo As DAO.Recordset
Set dbs = CurrentDb()
Set rst_AllText_Credits = CurrentDb.OpenRecordset("Credit_Memo")
rst_AllText_Credits.MoveFirst
If rst_AllText_Credits.EOF = False Then
rst_AllText_Credits.Close
''' Else
' make sure the all text credits are within the sql marketplace database credit table
Call sql_mke_tbl_Credit_Memo_sql_format
Call sql_Match_Credits_to_SQL
Set rst_AllText_SQL_Format_Compare_SQL_Table_Credit_Memo = CurrentDb.OpenRecordset("sql_Match_Credits_to_SQL")
rst_AllText_SQL_Format_Compare_SQL_Table_Credit_Memo.MoveFirst
If rst_AllText_SQL_Format_Compare_SQL_Table_Credit_Memo.EOF = True Then
'delete all text recs
' Call sql_Delete_Credit_Memo_Records
' DoCmd.SetWarnings (False)
' DoCmd.OpenQuery "sql_Delete_Credit_Memo_Records", acViewNormal, acEdit
' DoCmd.SetWarnings (True)
Else
' gets reprocess to sql
End If
rst_AllText_SQL_Format_Compare_SQL_Table_Credit_Memo.Close
End If
Comment