Re: Insert Error: Column name or number of supplied values does not match table definition.
- From: Erland Sommarskog <esquel@xxxxxxxxxxxxx>
- Date: Wed, 16 May 2007 22:57:40 +0000 (UTC)
Jason (JasonJason@xxxxxxxxxxxxx) writes:
I ported this to a stored procedure and I still get the same error message
when running the proc from ASP.NET, even though I can run the stored
procedure from SQL Server Management Studio just fine.
I created a separate proc to drop the temp table if it exists and call it
after calling the first procedure and still get the same error.
Obviously the table already exists with a different definition.
Note by the way, that if you create a temp table in a stored procedure, it
will be dropped as the table exists.
Could it be that the OLEDB driver has become corrupt? Should I reinstall
something?
No. You need to debug you program more zealously. There is apparently
something happening it, that you did not tell us.
But OLE DB driver? If you are using ASP .Net, the best choice for database
access is SqlClient. Not that this is going to fix this particular problem,
but unless you have a need to access different platforms, there is little
need to use OleDb. And, oh, if you insist on using OleDb, use SQLNCLI
as proivder for SQL Server, since this updated version of SQLOLEDB has
support for SQL 2005 features.
--
Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
.
- References:
- Insert Error: Column name or number of supplied values does not match table definition.
- From: Jason
- RE: Insert Error: Column name or number of supplied values does not match table definition.
- From: Walter Wang [MSFT]
- Re: Insert Error: Column name or number of supplied values does not match table definition.
- From: Jason
- Re: Insert Error: Column name or number of supplied values does not match table definition.
- From: Erland Sommarskog
- Re: Insert Error: Column name or number of supplied values does not match table definition.
- From: Jason
- Insert Error: Column name or number of supplied values does not match table definition.
- Prev by Date: Re: Insert Error: Column name or number of supplied values does not match table definition.
- Next by Date: Re: Vertical bar in SQL statement
- Previous by thread: Re: Insert Error: Column name or number of supplied values does not match table definition.
- Next by thread: Re: Insert Error: Column name or number of supplied values does not match table definition.
- Index(es):
Relevant Pages
|
Loading