How to get the table list of Access using ADO?

cunnycunny Member Posts: 129
Hello guys,

How could we get the table list of Access Database through C/SIDE?

any idear will be highly appreciated?
cunny Lee
MCP - MBS Navision
jle@naviworld.com

Answers

  • GregorDGregorD Member Posts: 26
    Hi,

    try the following. I made a connection to an ORACLE DB and it works fine!

    Automation Server: Microsoft ActiveX Data Objects 2.6 Library

    Hope, i could help!

    Ciao
    Gregor
  • cunnycunny Member Posts: 129
    Thanks GregorD,

    In fact, I am trying the Microsoft ActiveX Data Objects 2.6 Library but not good at it. Thanks for your reference. I will try it :)


    best regards,
    cunny Lee
    MCP - MBS Navision
    jle@naviworld.com
  • DenSterDenSter Member Posts: 8,305
    You can find tons of ADO samples in google. There is an ADO howto here in the download section that is very helpful. It will help you create the connection and open the database. You will have to program a loop to go through the returned recordset to process the data into NAV tables.
  • cunnycunny Member Posts: 129
    Daniel! I have done a lot of investigation but I still can not figure out which method or property of ADO I can use to retrieve the table name from Access Database! What is the exactly name of the ADO howto do you mean?
    cunny Lee
    MCP - MBS Navision
    jle@naviworld.com
  • cunnycunny Member Posts: 129
    Hi there,

    Yes, I found a solution. I found there is a system table in Access which was used to save all the tabel names called systemobjects(you need to show the system obejcts first). With quering this table thorugh ADO in C/SIDE, you can retrieve the table list which exists in Access database. I think for SQL we can use the same way and it's also not a problem but I didn't try it yet.

    Best regards,

    cunny,
    cunny Lee
    MCP - MBS Navision
    jle@naviworld.com
  • cunnycunny Member Posts: 129
    cunny wrote:
    Hi there,

    I think for SQL we can use the same way and it's also not a problem but I didn't try it yet.

    Best regards,

    cunny,

    Just want to clarify how to retrieve table list from SQL server 2005 dbs..

    "select * from INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE'"

    regards
    cunny Lee
    MCP - MBS Navision
    jle@naviworld.com
Sign In or Register to comment.