Microsoft Knowledge Base Email Alertz

(823228) - Describes a problem that occurs when you copy and then paste a table that has fields greater than 256 characters in an Access project. The fields are truncated when you view the the fields in the resulting table. Workarounds are provided.

Search KbAlertz

Advanced Search

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]











Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks

Article ID: 823228 - Last Review: March 29, 2007 - Revision: 4.1

Field size is changed when you copy and paste a table in an Access project

On This Page

SYMPTOMS

In an Access project, you can copy and then paste a table that has fields that are greater than 256 characters. However, when you view the size of the fields in the resulting table, the size of the fields is reduced.

CAUSE

When you copy and then paste a Microsoft SQL Server table in an Access project on a computer that does not have Microsoft SQL Server 2000 or SQL Server Desktop Engine (also known as MSDE 2000) installed, the copy and paste operation uses OLEDB instead of using a bulk copy operation through Data Transformation Services (DTS).

You can see the problem that is mentioned in the "Symptoms" section when you use OLEDB to copy and paste the table.

WORKAROUND

To work around this problem, use one of the following methods:
  • Method 1

    Perform the copy and paste operation on a computer that has SQL Server 2000, MSDE 2000, or SQL Server 2000 Client Tools installed in addition to Access 2003 or Access 2007.
  • Method 2

    Log on to a computer that has SQL Server 2000 Client Tools installed, and then use the Import and Export Data utility of SQL Server 2000 to copy the table.

    For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
    285829  (http://kbalertz.com/Feedback.aspx?kbNumber=285829/ ) How to Use Data Transformation Services (DTS) to Export Data from a Microsoft Access Database to an SQL Server Database

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

MORE INFORMATION

Steps to reproduce the problem in Access 2003

  1. Start SQL Query Analyzer.
  2. Connect to the Northwind database on your SQL Server 2000 server.
  3. Run the following code in SQL Query Analyzer:
    if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[TestCopyPaste]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
    drop table [dbo].[TestCopyPaste]
    GO
    
    CREATE TABLE [dbo].[TestCopyPaste] (
    	[vc1000] [varchar] (1000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
    	[vc2000] [varchar] (2000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
    	[vc3000] [varchar] (3000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
    	[vc4000] [varchar] (4000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
    	[vc5000] [varchar] (5000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
    	[vc6000] [varchar] (6000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
    	[vc7000] [varchar] (7000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
    	[vc8000] [varchar] (8000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL 
    ) ON [PRIMARY]
    GO
  4. Start Access 2003.
  5. On the File menu, click New.
  6. In the right pane, click Project using existing data.
  7. In the File New Database dialog box, type TestProject in the File name text box.
  8. In the Data Link Properties dialog box, provide the details of the SQL Server 2000 server that you connected to in Step 2.
  9. In the Select the database on the server list, click Northwind, and then click OK.
  10. In the right pane of the Project window, click the TestCopyPaste table.
  11. On the Edit menu, click Copy.
  12. On the Edit menu, click Paste.
  13. In the Paste Table As dialog box, type TestCopyPaste2 in the Table Name text box. Before you click OK, make sure that you click the Structure and Data option, and then click OK.
  14. Right-click TestCopyPaste2, and then click Design View.
Note Notice that the size of the varchar field is reduced in the new table that is named TestCopyPaste2.

APPLIES TO
  • Microsoft Office Access 2007
  • Microsoft Office Access 2003
Keywords: 
kbadp kbbug kbdatabase kbdesign KB823228
       

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