Forum > Databases
MDB: list all tables
SymbolicFrank:
According to the documentation, that should be done like this:
--- Code: SQL [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---SELECT MSysObjects.nameFROM MSysObjectsWHERE MSysObjects.TYPE IN (1,4,6) AND MSysObjects.name NOT LIKE '~*' AND MSysObjects.name NOT LIKE 'MSys*'ORDER BY MSysObjects.name
But, unfortunately, there is no way to grant Admin access to MSysObjects (GRANT is an invalid query).
The next one does work:
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---MyConnection.GetTableNames(tn);
But that also includes all the other objects, like queries.
How do I find out if something is a table?
Chris78:
Does "MDB" mean access database ?
SymbolicFrank:
Ah, sorry. Yes, it does.
Zvoni:
2 ways:
1) GetTableNames returns a TStrings (TStringList). Run through it and remove everything else (hope the naming-schema is clear enough to differentiate)
2) Implement your own "INFORMATION_SCHEMA" --> create your own Table, where you enter only the Tablenames you're interested in
Since i'm avoiding Access like the devil avoids holy water, i can't give you more info
af0815:
--- Quote from: Zvoni on March 20, 2023, 04:13:07 pm ---Since i'm avoiding Access like the devil avoids holy water, ...
--- End quote ---
+1
You are not alone :-)
Navigation
[0] Message Index
[#] Next page