Results 1 to 2 of 2
  1. #1
    kaledev is offline Novice
    Windows XP Access 2007
    Join Date
    Jan 2011
    Posts
    20

    Import into SQL Server from Access Error

    I am attempting to import an Excel file into SQL Server 08, by using an Access front-end. When I attempt to import the file, I recieve the following error:



    ODBC--insert on a linked table 'dbo_OLDDATA' failed.
    [Microsoft][SQL Server Native Client 10.0]Invalid character value for cast specification (#0)

    I am not sure if it is a problem with SQL Server or Access. The error message makes it sound like a datatype in access isn't compatible with the one in SQL Server. The only thing is that I have no clue which of the 18 or so fields it has a problem with.

    I have also tried importing into an access table, and then appending, with the exact same results. SQL Server formats dates as yyyy-mm-dd, so I reformatted fields to match, and made them text so it doesn't output incorrectly. (even if you format as yyyy-mm-dd, if you leave it as date/time it outputs as the original) Otherwise I am at a loss at to what may be causing this.

  2. #2
    kaledev is offline Novice
    Windows XP Access 2007
    Join Date
    Jan 2011
    Posts
    20
    I think I may have solved my problem with this one...I ended up changing all of my Date datatypes in SQL Server to Datetime, and Time datatypes to Varchar... After I did that my datetime fields from Access seem to import fine.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Excel import error
    By limez0r in forum Programming
    Replies: 1
    Last Post: 11-15-2010, 08:12 PM
  2. Field returns error when I import Text Files to Access
    By geng in forum Import/Export Data
    Replies: 3
    Last Post: 06-01-2010, 02:20 PM
  3. Ole server error
    By VICTOR HUGO in forum Access
    Replies: 2
    Last Post: 02-08-2010, 04:24 AM
  4. Import from SQl server
    By NaatuGaadu in forum Import/Export Data
    Replies: 2
    Last Post: 06-18-2009, 09:56 AM
  5. IMPORT ERROR ..PLEASE HELP
    By fadone in forum Import/Export Data
    Replies: 2
    Last Post: 04-20-2006, 06:36 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums