Microsoft Knowledge Base Email Alertz

KBAlertz.com: (816802) - When you configure the OdbcDataAdapter using the Data Adapter Configuration Wizard, you may receive the following error message after you specify the SQL query string: No mapping exists from DbType Object to a known OdbcType.

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]

Search KbAlertz

Advanced Search

Webmasters
Put kbAlertz on your website.
[ Click Here for more! ]





ASP.NET 3.5 Web Hosting with Windows 2008 and SQL 2008: Click Here!
Discount ASP.NET Hosting
ASP.NET 2.0 and 3.5
Windows2008 and SQL2008
US and UK Hosting
The ad says 3 - but KBAlertz referrals get
** SIX MONTHS FREE **


Bug Tracking Software
For bug tracking software or defect tracking software or issue tracking software, visit Axosoft.


Community Site



We Send hundreds of thousands of emails using ASP.NET Email



Expert Web Design & Graphic Design
Design44.com

ASP.NET 3.5 Web Hosting with Windows 2008 and SQL 2008: Click Here!
Discount ASP.NET Hosting
ASP.NET 2.0 and 3.5
Windows2008 and SQL2008
US and UK Hosting
The ad says 3 - but KBAlertz referrals get
** SIX MONTHS FREE **




Mentioned In








Microsoft Knowledge Base Article

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




Article ID: 816802 - Last Review: March 10, 2006 - Revision: 3.5

A "No mapping exists from DbType Object to a known OdbcType" error occurs when you configure the OdbcDataAdapter by using the Data Adapter Configuration Wizard

On This Page

SYMPTOMS

When you configure the OdbcDataAdapter using the Data Adapter Configuration Wizard, you may receive the following error message after you specify the SQL query string:
No mapping exists from DbType Object to a known OdbcType.

CAUSE

The problem occurs because the query string that is specified in the SELECT command of the Data Adapter Configuration Wizard is incorrect. When the query string is incorrect, the Data Adapter Configuration Wizard incorrectly generates the error message that is specified in the "Symptoms" section instead of one of the following error messages:
Invalid column name.
-or-
Invalid table name.

RESOLUTION

To resolve this problem, specify a valid query string on the Generate the SQL statements page when you configure the OdbcDataAdapter using the Data Adapter Configuration Wizard.

STATUS

This behavior is by design.

MORE INFORMATION

Steps To Reproduce the Behavior

  1. In Visual Studio .NET, create a new Visual Basic .NET or Visual C# .NET Windows Application project.
  2. In the ToolBox, double-click OdbcDataAdapter.
  3. The Data Adapter Configuration Wizard starts. Click Next.
  4. In Which data connection should the data adapter use?, click the Northwind database of your SQL Server.

    Note: If the connection does not exist, click New Connection to create a new connection.
  5. Click Next.
  6. Click the Use SQL statements option in the next page of the wizard, and then click Next.
  7. In the Generate the SQL statements page, type the following SQL statement:
     SELECT * FROM CUSTOMER WHERE CUSTOMERID = ?
  8. Click Next. You receive the error message that is described in the "Symptoms" section of this article.

REFERENCES

For more information, visit the following .NET Framework SDK v1.1 Documentation:
OdbcConnection Members
ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemDataOdbcOdbcConnectionMembersTopic.htm (ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemDataOdbcOdbcConnectionMembersTopic.htm)
Note: To access this link, you must install the .NET Framework SDK v1.1 Documentation

APPLIES TO
  • Microsoft Visual Studio .NET 2003 Enterprise Architect
  • Microsoft Visual Studio .NET 2003 Enterprise Developer
  • Microsoft Visual Studio .NET 2003 Academic Edition
  • Microsoft Visual Basic .NET 2003 Standard Edition
  • Microsoft Visual C# .NET 2003 Standard Edition
  • Microsoft ADO.NET 1.1
Keywords: 
kberrmsg kbtshoot kbdatabase kbprogramming kbprb KB816802
       

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