Re: Insert Error: Column name or number of supplied values does not match table definition.



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
.



Relevant Pages

  • Re: nested stored procedures and returning lots of rows
    ... I initially thought of using nested stored procedures and returning ... proc then the called stored procs can't see it ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ... Books Online for SQL Server 2005 at ...
    (comp.databases.ms-sqlserver)
  • Re: Another Concurrency Issue!!!!
    ... > allocating in blocks, using tables with identities, etc. ... > Columnist, SQL Server Professional ... I have a proc which returns a value after some DML operations on ... >> TIA ...
    (microsoft.public.sqlserver.programming)
  • Re: SQL 2005
    ... The SQL Server implementation is not just Stored Procs, ... it works very tightly in proc with the SQL Server Engine(most ... Now with all that I have said T-SQL is not going away and is still a needed ... >> the CLR is now supported in stored procedures and triggers. ...
    (borland.public.delphi.non-technical)
  • Re: Performance Problem Using ADO and Stored Procs
    ... >I have a stored proc that executes in < 15 seconds through Query Analyzer. ... If I execute this proc ... > of CPU activity on the server hosting SQL server for the SQL server ... > Private Function RunProc(vntDB As Variant, strProcName As String, ...
    (microsoft.public.data.ado)
  • Re: @Variable equivalent in OLEDB?
    ... OLEDB query to have a value passed in? ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ... Books Online for SQL Server 2005 at ...
    (microsoft.public.data.oledb)

Loading