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:
-or-
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
- In Visual Studio .NET, create a new Visual Basic .NET or
Visual C# .NET Windows Application project.
- In the ToolBox, double-click
OdbcDataAdapter.
- The Data Adapter Configuration Wizard starts. Click
Next.
- 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. - Click Next.
- Click the Use SQL statements option in the
next page of the wizard, and then click Next.
- In the Generate the SQL statements page,
type the following SQL statement:
SELECT * FROM CUSTOMER WHERE CUSTOMERID = ?
- 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:
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
| 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