?
Solved

SQL Server Managed Code Error 'system.core.... was not found in the SQL catalog'

Posted on 2009-05-04
1
Medium Priority
?
608 Views
Last Modified: 2012-05-06
Hi Experts,
I wrote a SP in C# to deploy to SQL Server using VS2008.  The code works fine when I use it in windows app.  But when I push put into C# SP it generates the following error:
Error      1      Assembly 'system.core, version=3.5.0.0, culture=neutral, publickeytoken=b77a5c561934e089.' was not found in the SQL catalog.      

Error      2      'System.Array' does not contain a definition for 'Count' and no extension method 'Count' accepting a first argument of type 'System.Array' could be found (are you missing a using directive or an assembly reference?)      

I have found several links to adding registering System.Core, adding references, etc.  but so far I have been unable to resolve the issue.  I 'think' it has to do with only 13 or so assemblies installed in SQL Server 2005.  Is there a way to add more references?

http://social.technet.microsoft.com/Forums/en-US/sqlnetfx/thread/3dfee9d1-0cfd-48da-a90f-100a7d67ee1c/

http://luke.breuer.com/time/item/SQL2005_using_LINQ_in_SQLCLR/213.aspx

http://social.technet.microsoft.com/Search/en-US/?Query=system.core+was+not+found+in+the+sql+catalog%3b

http://www.google.com/search?hl=en&client=firefox-a&channel=s&rls=org.mozilla%3Aen-US%3Aofficial&hs=XEg&q=Assembly+%27system.core+not+found+in+the+SQL+catalog&btnG=Search

NOTE: When I comment out everything between the drConflicts.Count() == 0 and the end it still gives the errors, when I comment out the if/end then the error goes away.  I am assuming System.array which is not part of the assemblies in SQL Server is the problem?

Thanks in advance your help!
...  
            DataRow[] dRow = dtInRunning.Select("plCallPID = " + pidID);
            DataRow[] drConflicts = dtConflict.Select("pdID = " + pidID);
 
            if (drConflicts.Count() == 0)
            {
                if (dRow.Count() > 0)
                {
                    pidRunningThreadQty = (Int32)dRow[0]["pidCnt"];
                    pidRunningThreadAllowed = (Int32)dRow[0]["pdPIDThreads"];
                    pidRunningClassQty = (Int32)dRow[0]["classCnt"];
                    pidRunningClassAllowed = (Int32)dRow[0]["pdClassThreads"];
                    pidMaxCallsPerDayAllowed = (Int32)dRow[0]["pdMaxCalls"];
 
                    if (pidRunningThreadQty >= pidRunningThreadAllowed)
                    { runPID = false; }
                    if (pidRunningClassQty >= pidRunningClassAllowed)
                    { runPID = false; }
                    //if (pidMaxCallsPerDayQty >= pidMaxCallsPerDayAllowed)
                    //{ runPID = false; }
                }
            }
            else
            {
                runPID = false;
            }  // if (drConflicts.Count(....

Open in new window

0
Comment
Question by:prgMan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 43

Accepted Solution

by:
Eugene Z earned 1500 total points
ID: 24326359
did you install .net framework 3.5
and all SW service packs

can you try to do it on VS2005?
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Data architecture is an important aspect in Software as a Service (SaaS) delivery model. This article is a study on the database of a single-tenant application that could be extended to support multiple tenants. The application is web-based develope…
In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question