The Access database depends on the Microsoft Jet database
engine for storage. The Microsoft Jet database engine stores all the objects
that are specific to Access, including forms, reports, macros, modules, and
commandbars in the system tables for Access in the Microsoft Jet engine
database. However, the Microsoft Access project uses Microsoft SQL Server for
database storage. Therefore, Access projects are independent of the Microsoft
Jet database engine.
Because the Microsoft Jet database engine does
not support tables that have long field names (specifically, field names that
are greater than 63 characters), exporting tables that have long field names to
an Access database is not successful. When you try to import a table that has
long field names into an Access database, the import process may fail, and you
may receive the following error message in Access 2003:
ODBC--call failed.
[Microsoft][ODBC SQL Server Driver][SQL
Server]Invalid column name
<columnName>'.
(#207)
If you use Access 2002, you may receive the following error
message:
Steps to Reproduce the Problem
- Start Access.
- Open the Northwind sample Access project that is connected
to a valid SQL Server database.
- In the database window, click Queries
under Objects.
- In the right pane, double-click Create stored
procedure in designer.
- In the Add Table dialog box, click
Close.
- On the View menu, click SQL
View.
- Paste the following stored procedure, and then save the
stored procedure as StoredProcedure1:
CREATE PROCEDURE StoredProcedure1
AS
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[table_longcolumn]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[table_longcolumn]
CREATE TABLE [dbo].[table_longcolumn]
(
[aaaaaaaaaabbbbbbbbbbaaaaaaaaaabbbbbbbbbbaaaaaaaaaabbbbbbbbbbaaaa] [char] (50) PRIMARY KEY NOT NULL,
[col1] [char] (50),
[col2] [int] NULL
) ON [PRIMARY]
RETURN
- In the database window, double-click StoredProcedure1 to run the stored procedure.
Note When you run the StoredProcedure1 stored procedure, a new table is created in the Northwind
project. This table is named table_longcolumn. - Right-click the table_longcolumn table,
and then click Export.
- In the Export Table 'table_longcolumn' To
dialog box, click the Access database, and then click
Export.
- In the Export dialog box, click
OK.
Microsoft Access stops responding and then closes
unexpectedly.