Microsoft Knowledge Base Article
This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved.
Terms
of Use |
Trademarks
Article ID: 824168 - Last Review: June 9, 2004 - Revision: 1.3
Microsoft Access closes when you try to export a table to an Access database
Novice: Requires knowledge of the user interface on single-user computers.
This article applies only to a Microsoft Access project (.adp).
On This Page
SYMPTOMS
In a Microsoft Access project, when you try to export a
table to an Access database (*.mdb) and the table contains fields that have
long field names, Microsoft Access closes unexpectedly. You receive the
following error message:
Microsoft Office Access has
encountered a problem and needs to close.
We are sorry for the
inconvenience.
WORKAROUND
To work around this problem, use field names that are
shorter.
MORE INFORMATION
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.
APPLIES TO
- Microsoft Office Access 2003
- Microsoft Access 2002 Standard Edition
| kbdesign kbdatabase kbprogramming kbexport kberrmsg kbprb KB824168 |
Community Feedback System
Very often, it takes hours to solve a problem. Very often, you've looked high
and low, and have tried a lot of solutions. When you finally found it, chances
are, it was because someone else helped you. Here's your chance to give back.
Use our community feedback tool to let others know what worked for you and what
didn't.
Please also understand that the community feedback system is not warranted to be
correct, it's simply a system that we've built to let people try and help each
other. If something in a feedback response doesn't make sense to you, or you're
not comfortable making changes that the feedback talks about (like registry
edits), please consult a professional.
Thank you for using kbAlertz.com Feedback System.
-- Scott Cate
Be the first to leave feedback, to help others about this knowledge base
article.
(Optional) Name
(Optional)
Public URL Or Email
Comments
No
HTML -- Text Only Please