none
Could not find field 'SID' error message -2147217900 (80040e14) RRS feed

  • Question

  • Hi all

    I'm using Microsoft Office Access 2007 (12.0.6735.5000) SP3 MSO (12.0.6739.5000) in a

    Windows 7 Enterprise Version 6.1 (Build 7601 Service Pack 1) workstation.

    One of the applications I made has 3 accdb backend, one for each year of life.

    Now I'm trying to make the fourth to 2016. I started to make a copy of the one from 2015 and deleted monthly tables, update a few others and deleted some queries, by "hand". Made a few compact and repairs...

    My problem in one of the routines I run, I get the error: Could not find field 'SID'

    Already spent some tens hours around this bs... I know the problem is in the object MSysACEs, the only that ha a field named SID... but can't find a good solution or pin point the reason

    In despair I tested with a copy of the backend from last year and i concludes that I should not erase many tables.

    I even try to erase one by one and making compact and repairs beetwen each erase. After a delete more or less 12 /15 the problem arise!!

    I even ask a collegue of mine to create a accdb in his workstation... In spite of that the result is the same...

    Another weird thing is I try to open the MSysACEs table,  in the old backend as 6 hundered records and no problem in the new one less the one hundered and ... error!!

    Has someone see something like this ? Can you give me a hint to overcome this question ?

    Final note: I use ADODB and ADOX

    Best regards

    Joao


    Joao Simplicio Rodrigues



    Friday, January 29, 2016 9:40 PM

All replies

  • My guess: database corruption.

    Insted of copying it, create a new empty database and import everything you need.

    Sunday, January 31, 2016 4:10 PM
  • Hi Stefan,

    Did that.

    I forgot to mention that this ocurres when I create a table with this code:

     Dim dbDCR As ADODB.Connection
     Dim cmdDCR As ADODB.Command
     Dim strSQL As String
     Set dbDCR = New ADODB.Connection
     dbDCR.CursorLocation = adUseClient
     dbDCR.CommandTimeout = 0
     dbDCR.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;User ID=Admin;Data Source=C:\CAMINO\BE2016.accdb;Mode=Share Deny None;"
     dbDCR.ConnectionTimeout = 0
     dbDCR.Open
     strSQL = "SELECT REINCIDEM.XNUC_TRATA, REINCIDEM.DATA_TRATA, REINCIDEM.NROTIN, REINCIDEM.ESTADO, REINCIDEM.BALCAO_HCIR AS BALCAO,"
     strSQL = strSQL + " 1 AS QTDIVA"
     strSQL = strSQL + " INTO TMP_REI FROM REINCIDEM"
     strSQL = strSQL + " WHERE YEAR(REINCIDEM.DATA_TRATA)=" + CStr(QANO) + " AND MONTH(REINCIDEM.DATA_TRATA)=" + CStr(QMES) + ";"
     Set cmdDCR = New ADODB.Command
     cmdDCR.CommandText = strSQL
     cmdDCR.ActiveConnection = dbDCR
     cmdDCR.Execute ' error SID
     Do
      If cmdDCR.State = adStateExecuting Then
       Sleep 100
      Else
       Exit Do
      End If
     Loop
     Set cmdDCR = Nothing
    
    Thanks anyway.


    Joao Simplicio Rodrigues

    Monday, February 1, 2016 11:37 AM
  • Drop the UserID parameter (see https://connectionstrings.com/access-2013/) ACE don't need it.

    Monday, February 1, 2016 11:54 AM
  • Done as you sugest. No effect.

    32 tables and 20 queries doesn't work. The old database has at least more 48 tables and more 12 queries and it works.

    I even try create a new clean accdb (created in another machine) and with copy / paste the tables and queries.

    Also change Navigation Pane to don't show System Objects

    Did not work.

    Next steps:

    1 - Copy all this to another workstation and try.

    2 - Create a new copy of the old database and delete the tables and i don't need slowly with code...  And also the records from the table that stay also with queries ... slowly.

    And try not to go nuts...

    Thanks for you input.


    Joao Simplicio Rodrigues

    Monday, February 1, 2016 8:20 PM