Reply
error moving from sql 2000 to sql 2005 on .asp code
Old 02-13-2007, 10:36 AM error moving from sql 2000 to sql 2005 on .asp code
Novice Talker

Posts: 5
Name: taz
We recently had a website running a sql 2000 server and then migrated it to a sql 2005 server and now we are having nothing but problems. The current error is this:


ADODB.Commanderror '800a0cc1'Item cannot be found in the collection corresponding to the requested name or ordinal.

any ideas as to what is going on. I have verified the code on both the old server and new server and all the .asp code is still the same. Any ideas?
tazinternet is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Old 02-13-2007, 11:09 AM Re: error moving from sql 2000 to sql 2005 on .asp code
chrishirst's Avatar
Super Moderator

Posts: 13,643
Location: Blackpool. UK
That error is usually caused by a specified field name not appearing in the recordset.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Indifference will be the downfall of mankind, but who cares?
Code Samples | People Counting System
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 02-13-2007, 12:50 PM Re: error moving from sql 2000 to sql 2005 on .asp code
Novice Talker

Posts: 5
Name: taz
Can you please be a bit more specific? I have compared the stored procedures on the 2000 server and they match the stored procedures on the 2005 sql server. I have also verified that the .asp code is exactly the same using diff and it is.
tazinternet is offline
Reply With Quote
View Public Profile
 
Old 02-13-2007, 01:58 PM Re: error moving from sql 2000 to sql 2005 on .asp code
Learning Newbie's Avatar
Moderator

Posts: 5,199
Name: John Alexander
No offense, but if you want help, you need to be more specific or no one else can. How could anybody possibly diagnose your problem with only the error message? Do you have a stack trace? The code in those procs? Maybe you're using deprecated SQL?
Learning Newbie is offline
Reply With Quote
View Public Profile
 
Old 02-13-2007, 02:17 PM Re: error moving from sql 2000 to sql 2005 on .asp code
Novice Talker

Posts: 5
Name: taz
A stack trace. Can you tell me how to get that off an external server? As for more of the code. Here is the .asp code:

<%
REM Function gets name of product entity
Function GetName(strAssocType, intAssocObjId)
Select case strAssocType
case "pf_id"
strText = "product family"
strStoredProc = "prod_family_select_by_pf_id"
strRS = "pf_name"
case "pd_id"
strText = "product department"
strStoredProc = "prod_dept_select_by_pd_id"
strRS = "pd_name"
case "prod_id"
strText = "product"
strStoredProc = "prod_select_name_by_prod_id"
strRS = "prod_name"
end select
CreateDBConnection()
ConnectionObject.BeginTrans
CommandObject.CommandType = 4 'adCommandObjectStoredProc
CommandObject.CommandText = strStoredProc
'CommandObject.Parameters.Refres
CommandObject(1) = intAssocObjId
set rsName = CommandObject.Execute()
CloseDBConnection()
If not rsName.eof then
strRS = rsName(strRS)
GetName = array(strText, strRS)
else
GetName = null
end if
End Function
%>
tazinternet is offline
Reply With Quote
View Public Profile
 
Old 02-16-2007, 08:40 AM Re: error moving from sql 2000 to sql 2005 on .asp code
bbutton's Avatar
Experienced Talker

Posts: 43
Name: Bill Button
Location: Reading,UK
You need to look at the stored procedure that is being called do you know if all 3 of the stored procedures cause the error. My guess is you will find that a field in one of your tables has not migrated properly. You should check the table structure or views, depending on what the stored procedures are doing. You could also try running the stored procedure's from with in the Query Analyser manually which should give you more information on what the problem might be.
bbutton is offline
Reply With Quote
View Public Profile Visit bbutton's homepage!
 
Old 02-20-2007, 02:45 PM Re: error moving from sql 2000 to sql 2005 on .asp code
Novice Talker

Posts: 5
Name: taz
I also posted this question on:
http://www.experts-exchange.com/Web_..._22340650.html and it was finally answered with a solution. Please check it out, but basically it was a problem with the actual SQL server migration. When the server was migrated from 2000 to 2005 Microsoft suggested using the Native SQL drivers which was the mistake. Switching back to the ODBC SQL driver was the solution.

thanks for all that replied though.
tazinternet is offline
Reply With Quote
View Public Profile
 
Old 02-21-2007, 09:14 AM Re: error moving from sql 2000 to sql 2005 on .asp code
Super Talker

Posts: 109
This is a really interesting post.

We're going to be migrating from 2000 SQL to 2005 SQL. We're also putting our website into ASP.NET (which I'm learning).

But... we have a ton of Intranet ASP code that we were going to leave the same.

I read with ASP.NET there are four connection namespaces: one will go right into MS-SQL and another one with ODBC.

If we're using both ASP.NET and ASP, will how the 2005 SQL drivers are set in SQL Server be an issue to having the code run properly?

DonnaZ

Donna
DonnaZ is offline
Reply With Quote
View Public Profile
 
Old 02-21-2007, 02:20 PM Re: error moving from sql 2000 to sql 2005 on .asp code
Learning Newbie's Avatar
Moderator

Posts: 5,199
Name: John Alexander
Your old ASP code should continue to work as written as long as you allow ODBC connections. Your new ASP.NET code should use System.Data.SqlClient namespace to talk to the database, this is much faster than ODBC and also more featured.

Your ASP and ASP.NET code can both run in the same web application, but they won't be able to share session state.
Learning Newbie is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to error moving from sql 2000 to sql 2005 on .asp code
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.15322 seconds with 12 queries