Results 1 to 5 of 5

Thread: [VB6 + Access] Recognizing table recovery using Ado or Adox

  1. #1
    Join Date
    Dec 2008
    Posts
    46

    [VB6 + Access] Recognizing table recovery using Ado or Adox

    I created a small software that I have a copy of a database by clearing all the tables except for the system, the problem arises when it appears in the db table of Recovery :[Access] table recovery. Someone knows how to locate this table with Ado or Adox Or should I make to weep and to use force Dao (always in that case you can) ,I put the db in rapidshare if you want to test it surpasses the 500 KB maximum RapidShare: Easy Filehosting.This is the code that you can do the tests

    Code:
     Sub Main () 
          'Fill in the references and Ado Adox 
          Dim cn As ADODB.Connection 
          Dim obj_Catalog As ADOX.Catalog 
          Dim obj_table As ADOX.Table 
     
          Set cn = New ADODB.Connection 
          cn.Open "Provider = Microsoft.Jet.OLEDB.4.0; Data Source = C: \ NonCompattato.mdb" 
     
          Set obj_Catalog = New ADOX.Catalog 
          Set cn = obj_Catalog.ActiveConnection 
     
          For Each obj_table In obj_Catalog.Tables 
     
              If obj_table.Type = "TABLE" Then 
                  MsgBox "Table Normal eliminable" & obj_table.Name 
              Else 
                  MsgBox "Table does not eliminable" & obj_table.Name 
              End If 
     
          Next 
     
          cn.Close 
          Set cn = Nothing 
          Set obj_Catalog = Nothing 
     
      End Sub

  2. #2
    Join Date
    May 2008
    Posts
    2,297

    Re: [VB6 + Access] Recognizing table recovery using Ado or Adox

    There is no need to use ADOX to locate just use the method of the ADO connection OpenSchema. However, you can safely remove this
    Code:
     cn.execute "drop table <tablename>"
    However I am not worried that much because when you compact the database automatically deleted.

  3. #3
    Join Date
    Dec 2008
    Posts
    46

    Re: [VB6 + Access] Recognizing table recovery using Ado or Adox

    You're right, I reread the question and I explained definitely wrong, I need to know how to recognize the scale of recovery in order not to run the query that the clear Because if no VB crashes, in effect, however, enclosing the table name in brackets this instruction.It works without making a turn, then the solution that you gave me solve the problem but I still curious to know how to recognize
    Code:
    Sub main () 
          Dim cn As ADODB.Connection 
          As ADODB.Recordset Dim rs_Schema 
          As Long Dim i_iteratore 
          As String Dim s_String
     
          Set cn = New ADODB.Connection 
          cn.CursorLocation = adUseClient 
          cn.Open "Provider = Microsoft.Jet.OLEDB.4.0; Data Source = C: \ NonCompattato.mdb" 
     
          Set rs_Schema = cn.OpenSchema (adSchemaTables) 
     
          Do While Not (rs_Schema.EOF) 
     
              s_Stringa = "" 
              For i_iteratore = 0 To rs_Schema.Fields.Count - 1 
                  s_Stringa = s_Stringa & rs_Schema (i_iteratore). Name & "=" & rs_Schema (i_iteratore). Value & "|"  
              Next 
     
              Debug.Print s_Stringa 
              rs_Schema.MoveNext 
     
          Loop 
     
          rs_Schema.Close 
          Set rs_Schema = Nothing  
          cn.Close 
          Set cn = Nothing  
      End Sub

  4. #4
    Join Date
    Apr 2008
    Posts
    2,005

    Re: [VB6 + Access] Recognizing table recovery using Ado or Adox

    To me it appears that the tables that start with the tilde (as in this case) are only temporary tables that Access has created, but not anything being done with the recovery of data. That table contains a single text field 'field1' and one record of the 'dr', which certainly does not justify the difference in size after you compact the database that has 10MB of only 240KB. With regard to the message, I have not received anything, at least I do not think. But I am pretty suspicious so if I see a sender that I do not know, not even exhaust the message (I always read the list from the server, then I decide whether to download or not).

  5. #5
    Join Date
    Dec 2008
    Posts
    46

    Re: [VB6 + Access] Recognizing table recovery using Ado or Adox

    In fact I did more testing and I have seen, for example, that if I create a new db three tables (with primary key) to delete after I open the table MSysObjects have magically appeared in three tables that start with the tilde.i close the db, it reopened without compacting and the three tables have vanished. Probably the table that I found in my db has remained there because of some crash.

Similar Threads

  1. Replies: 4
    Last Post: 30-11-2010, 03:01 AM
  2. Recovery of data from InnoDB table
    By Macario in forum Software Development
    Replies: 4
    Last Post: 08-12-2009, 10:10 PM
  3. Recovery Manager not recognizing CD/DVD drive
    By bethdv in forum Operating Systems
    Replies: 4
    Last Post: 06-11-2009, 12:28 PM
  4. To export an access table definition into Excel
    By bhola in forum Windows Software
    Replies: 3
    Last Post: 03-09-2009, 05:54 PM
  5. Need to access conversionerrors table
    By Ephraim in forum Windows Software
    Replies: 3
    Last Post: 04-03-2009, 09:10 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,401,792.37521 seconds with 17 queries