Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 23-02-2009
Member
 
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
Reply With Quote
  #2  
Old 23-02-2009
Member
 
Join Date: May 2008
Posts: 2,293
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.
Reply With Quote
  #3  
Old 23-02-2009
Member
 
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
Reply With Quote
  #4  
Old 23-02-2009
Member
 
Join Date: Apr 2008
Posts: 2,001
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).
Reply With Quote
  #5  
Old 23-02-2009
Member
 
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.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "[VB6 + Access] Recognizing table recovery using Ado or Adox"
Thread Thread Starter Forum Replies Last Post
Colonizing a table of employees from a table of applicants in Microsoft Access laplapye Windows Software 4 30-11-2010 03:01 AM
Recovery of data from InnoDB table Macario Software Development 4 08-12-2009 10:10 PM
Recovery Manager not recognizing CD/DVD drive bethdv Operating Systems 4 06-11-2009 12:28 PM
To export an access table definition into Excel bhola Windows Software 3 03-09-2009 05:54 PM
Need to access conversionerrors table Ephraim Windows Software 3 04-03-2009 09:10 AM


All times are GMT +5.5. The time now is 08:24 AM.