Attaching SQL Server 7.0 tables in MS Access with long table names

Attaching SQL Server 7.0 tables in MS Access with long table names

Post by Tim Anderso » Wed, 09 Dec 1998 04:00:00



I get the following error while attempting to link an SQL Server 7.0, beta 3
table in Microsoft Access 97:

The database engine can't find 'dbo_<<table_name>>'.  Make sure it is a
valid parameter or alias name, that it doesn't include invalid characters or
punctuation, and that the name isn't too long.

Where <<table_name>> is a valid table name in SQL Server and MS Access.  It
seems to happen for tables with names longer than 27 characters.  However,
it doesn't appear to happen with SQL Server 6.5 in tables with the exact
same name and structure.

Can someone please help?

TIA,
Tim Anderson

 
 
 

1. Access 97 Attached Tables With SQL Server 7.0 (conversion from 6.5)

In an Access 97 application, we attach (link) to the tables in the SQL
Server 6.5 Database using the following code:

    Dim tdfTable As TableDef
    Dim strTableName As String
    Dim strServerName As String
    Dim strDatabaseName As String
    Dim strUserID As String
    Dim strPassword As String

    Set tdfTable = CurrentDb.CreateTableDef(strTableName)
    tdfTable.Connect = ";DATABASE=ODBC" & _
                ";driver={SQL Server}" & _
                ";server=" & strServerName & _
                ";database=" & strDatabaseName & _
                ";uid=" & strUserID & _
                ";pwd=" & strPassword
    tdfTable.SourceTableName = strTableName
    CurrentDb.TableDefs.Append tdfTable

We use a common strUserID and strPassword for all users of the application.

After converting to SQL Server 7.0, the application pops up the SQL Server
Login Dialog Box.

Any ideas?

Thanks,
Jimmy Johnson

2. Insert data problem

3. MS Access tables -> MS SQL server tables

4. Moving from programming in DBase IV to ......?

5. Speed proplems accessing huge table (MS SQL Server 7.0)

6. Text toolbar

7. MS Access and sql 6.5 SP 2: #deleted messages on attached tables

8. Committing changes for calculated fields

9. Cannot attach to a SQL table via MS-Access

10. MS Access and sql 6.5 SP 2: #deleted messages on attached tables

11. Attaching SQL Tables to MS Access in Code

12. Global TEMP Table problem under MS-SQL Server 6.5 attached to from a Delphi 1 program

13. Linking SQL Server Table to MS Access Table