Accessing Sybase Database with MS Access 97

I'm trying to use Microsoft Access 97 to access a Sybase SQL Anywhere
database. I can link to 95% of the tables, but I'm not allowed to link or
import any of the tables created by "SYS". I need to access SYSTABLE,
SYSCOLUMN, SYSDOMAIN, etc. As a matter of fact, not only am I not able to
import the tables, I can't even see those tables when I'm presented with a
list of tables to choose from in MS Access.

Please reply to my e-mail address if possible! Thanks.

Peter Lucas
Decade Software Company

6/15/2000 4:18:41 PM
sybase.sqlanywhere.general 32637 articles. 22 followers. Follow

2 Replies

Similar Articles

[PageSpeed] 56

Maybe Access is only listing those tables it has direct or indirect 
ownership of.  Check to see if there is something in the Access setup 
that tells you what object owners to use when looking at the meta data.
Jim Egan [TeamSybase]
Houston, TX

Sybase Developers Network
6/16/2000 2:56:30 AM
Hi Lucas.

Try this code. It should help you. Copy and paste it into your Access Modul

Public Sub Bind_Tables()

    Dim db_current As Database, db_source As Database, td_current As
    Dim connect_string As String, table_name As String, pos As Integer

    connect_string = "ODBC;DSN=Facts R�sle" 'replace this with your
ODBC-Source name

    Set db_current = CurrentDb()

    Set db_source = OpenDatabase("", False, False, connect_string)

    For Each td_source In db_source.TableDefs

        pos = InStr(1, td_source.Name, ".") 'Where is the dot?

        table_name = Left(td_source.Name, pos - 1) & "_" &
Mid(td_source.Name, pos + 1, Len(td_source.Name) - pos) 'replace the dot
with an underline (dots are not allowed in Access-Tablenames)

        Set td_current = db_current.CreateTableDef(table_name)
        td_current.Connect = connect_string
        td_current.SourceTableName = td_source.Name
        db_current.TableDefs.Append td_current




End Sub

6/20/2000 7:18:27 AM