Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1030339
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T12:41:06+00:00 2026-05-16T12:41:06+00:00

I am upscaling an access 2003 database to SQL Server Express 2008. The tables

  • 0

I am upscaling an access 2003 database to SQL Server Express 2008. The tables appear to be created ok and the data looks ok.

I have an MFC application that connects to this database. It worked fine connecting to access, but when I connect to SQL Server I am getting the following error on a select statement.

DBMS: Microsoft SQL Server
Version: 10.50.1600
ODBC Driver Manager Version: 03.80.0000
Warning: ODBC Success With Info on field 0.
String data, right truncation

State:01004,Native:0,Origin:[Microsoft][ODBC SQL Server Driver]

The data that is returned should be 8 characters but is only 7 with the right most character truncated.

The access front end can read the data from SQL Server correctly.

The field in the SQL Server table is defined as nvarchar with a length of 8.

The code to read the field looks something like

CDatabase Database;
CString sSerialNumber = "00000000";
CString SqlString;

CString sDsn = "Driver={SQL Server};Server=server\\db;Database=Boards;Uid=uid;Pwd=pwd;Trusted_Connection=False";
Database.Open(NULL,false,false,sDsn);

CRecordset recset( &Database );
SqlString.Format("Select SerialNumber from boards where MACAddress = '%s'",mac);
recset.Open(CRecordset::forwardOnly,SqlString,CRecordset::readOnly);
recset.GetFieldValue("SerialNumber",sSerialNumber);

After this, sSerialNumber should be 12345678 but its 1234567

Thanks for the help

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T12:41:06+00:00Added an answer on May 16, 2026 at 12:41 pm

    I’d agree that this is driver related. The {SQL Server} driver was introduced for use with SQL 2000. {SQL Native Client} came along with 2005. Ideally, for your 2008 database, you should use the newest {SQL Server Native Client 10.0}. The newer drivers are backward compatible with older versions of SQL Server.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 534k
  • Answers 533k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I think the problem could be the use of children()… May 17, 2026 at 12:39 am
  • Editorial Team
    Editorial Team added an answer SQL Express is pretty limited, I don't know of any… May 17, 2026 at 12:39 am
  • Editorial Team
    Editorial Team added an answer We have a similar setup at our company. We primarily… May 17, 2026 at 12:39 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I've set on imagecache a fixed scale for my images (230 x 150). Upscaling
Im trying to understand downscaling. I can see how interpolation algorithms such as bicubic
I can't seem to get my ImageView to display its source image in its
I'm in the process of up-scaling the graphics for my game for better display
Okay, so this probably sounds terribly nefarious, but I need such capabilities for my
I'd like to create a TabPanel that occupies the entire browser client area, and
I am working on a project that involves a lot of immutable classes. We
EDIT: Now a Major Motion Blog Post at http://messymatters.com/sealedbids The idea of rot13 is
In my CSS, I'm currently using this: img.info { max-width: 620px; max-height: 800px; }

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.