Hi,
I have a Access database with tables of differente type (System tables, View, Access tables and Tables) and I need to read only the contents of the "Tables".
I would like to know if with the Ebasic database library is possible to choose the differente table type.
Thanks!
Sergio
I don't really understand the question, but I use Access all the time without too much difficulty (weak on memo fields).
Hi Sergio!
I am not sure understand your question 100%
Quote
..choose the differente table type ???
Usually you are accessing tables by they name not by type but generally everything you are able to accomplish in a databank through SQL statements you can do it through EBasic since it has "dbExecSQL" command.
So just use Access query wizard to develop your query and copy-paste it into a string.
Ficko
I use a check for MSYS in the table name (first 4 characters)... like in the following code. These are usually the system tables which you don't want to touch.
This example loads a listview control with all tables that do not start with MSYS...ie users tables only.
pTables = dbListTables(pdb)
IF pTables <> NULL
FOR temp = EACH pTables as STRING
IF ucase$(left$(#temp,4))<>"MSYS"
CONTROLCMD w1,LISTVIEW_TABLES,@LVINSERTITEM,RecCount,#temp
RecCount=RecCount+1
ENDIF
NEXT
ListRemoveAll(pTables,TRUE)
ELSE
messagebox w1,"Unable to list Tables","Load Listview",@MB_ICONSTOP | @MB_OK
ENDIF
Many thanks to all for the replies.
The Peterpuk suggestion should work for my needs. Hovewer i think that is possible to use the SQLTables() function declared in sql.inc that allows to define the table type (googling the web I found several Visual Basic and C++ examples). If I understand how to use it, maybe I can solve my problem.
bye :)
Sergio