DAO 3.51 problem with Tabledef (Data type conversion error) (1 Viewer)

Tym

New member
Local time
Today, 05:06
Joined
Nov 22, 2011
Messages
2
Got a very strange one here...

I've had a VB6 app for the last 6 or 7 years that uses a DAO 3.51 database to store the data. No problems at all in that time... (I use Access 97 to manually edit a few things when I'm testing)

Now I've got a couple of databases that are giving a strange error. Doesn't matter if I use my VB6 app, or if I do this in Access 97 (but this is the Access version):
Public Sub ListTables()
Dim Tdx As TableDef
For Each Tdx In CurrentDB.TableDefs
Tdx.Attributes = 0
Debug.Print (Tdx.Name)
DoEvents
Next Tdx
Debug.Print "done"
End Sub

It ticks through nicely for about 95+% of the tables then all of a sudden at Next Tdf, I get "3421: Data Type Conversion Error" - after it's printed the table name. It's as if the next table, isn't a table...

Odd thing is, I'm currently re-writing this in vb2010 and written a convertion program to migrate the data to an access 2007 format file. That program, using ADOX and ADO sails through the SAME tabledefs absolutely FINE without any errors!!!

The database size is 746,744 so is comfortably inside the 1Gb limit.

What on earth is going, and more importantly, HOW DO I FIX IT!! :)

Thanks for reading...


Tym.
 

Tym

New member
Local time
Today, 05:06
Joined
Nov 22, 2011
Messages
2
Oh. Something that may or may not help...

Currentdb.tabledefs.count = -30912
 

Users who are viewing this thread

Top Bottom