ERROR ENCOUNTER CALLING UDF

Mar 6, 2008

I have created a SQL Server Project with table-valued function. I compile and deploy the project to SQL server successfully. I did some testing by calling the function and encounters no error.Then, I decided to add another function which is scalar function. Again, I compile the project and deploy it to SQL server without any problem. Now, when I try to call the second function I created, I encounter some error during execution. But calling the first function, the error did not occur; it execute without any problem.
Please help and tell me what should I do to resolve it. Below is the message return after calling the second function.

Msg 6522, Level 16, State 2, Line 1
A .NET Framework error occurred during execution of user defined routine or aggregate 'dgaUDF_GetUserStatus':
System.TypeInitializationException: The type initializer for 'System.Data.SqlClient.SqlConnection' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.Data.SqlClient.SqlConnectionFactory' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.Data.SqlClient.SqlPerformanceCounters' threw an exception. ---> System.IO.FileLoadException: The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
System.IO.FileLoadException:
at System.Diagnostics.Switch.InitializeWithStatus()
at System.Diagnostics.Switch.get_SwitchSetting()
at System.Diagnostics.TraceSwitch.get_Level()
at System.Data.ProviderBase.DbConnectionPoolCounters..ctor(String categoryName, String categoryHelp)
at System.Data.SqlClient.SqlPerformanceCounters..ctor()
at System.Data.SqlClient.SqlPerformanceCounters..cctor()
System.TypeInitializationException:
at System.Data.SqlClient.SqlConnectionFactory..ctor()
at System.Data.SqlClient.SqlConnectionFactory..cctor()
System.TypeInitializationException:
at System.Data.SqlClient.SqlConnection..cctor()
System.TypeInitializationException:
at System.Data.SqlClient.SqlConnection..ctor(String connectionString)
at UserDefinedFunctions.dgaUDF_GetUserStatus(SqlString userid, SqlDateTime workdate)

View 13 Replies


ADVERTISEMENT

[Help]I Encounter An Error When Using RDA

Jan 29, 2007

Hi All,

When my customers sync the data using RDA, they got this error message,

I don't know how to avoid it. ( I am using window mobile 5, Palm Treo 700wx, C# 2005, Sql server 2005(remote server) and Sql CE 3.0):



The OLE DB data type information in the SQL Mobile columns does not matchthe information in the SQL server columns for the RDA table (Client type=3,server type =20, Table naame =MyTable)

it's very urgent, could anyone help me out? Thanks.





James

View 4 Replies View Related

A Query I've Encounter That Has Me Stumped ... Anybody?

Aug 19, 2007

Hello Everyone,

I was hoping somebody could help me out with a query I've been trying to solve.


My Table Structure:

[UserMessages]

MessageID int
ToUserID int
FromUserID int
Subject varchar(200)
Message varchar(max)
isNew bit


[UserMessageReplies]

ReplyMessageID int
MessageID int
ToUserID int
FromUserID int
Message varchar(max)
isNew bit


Sample Data:

[UserMessages]

MessageID | ToUserID | FromUserID | Subject | Message | isNew
-------------------------------------------------------------------------------------------------------------
1 1 2 test subject Message Body 0
2 2 1 test subject Message Body 0
3 1 4 test subject Message Body 1
4 1 5 test subject Message Body 1


[UserMessageReplies]


ReplyMessageID | MessageID | ToUserID | FromUserID | Message | isNew
---------------------------------------------------------------------------------------------------------------------------
1 1 2 1 re: Message Body 0
2 1 1 2 re: Message Body 0
3 1 2 1 re: Message Body 0
4 1 1 2 re: Message Body 0
5 1 2 1 re: Message Body 1
6 2 1 2 re: Message Body 1


Explanation:

ReplyMessageID = 1-4 signfies that there is a thread response to MessageID 1 but they have been opened (isNew =0).
ReplyMessageID = 5 signfies that there is a new thread response to MessageID 1.
ReplyMessageID = 6 signifies that there is a reply from a message UserID=1 sent out (MessageID 2)

There needs to be a filter to check UserMessages.TOUserID=1 OR UserMessageReplies.ToUserID=1 to ensure that we can capture a msg that UserID=1 had sent out but now there is a reply to the Message by the User (in this example data i've setup MessageID = 2 to handle that possibility)

My Goal:

To select all messages for a ToUserID and order them by UserMessages.isNew or UserMessageReplies.isNew. This must include a message the user has sent but now has received a reply. (This means the first filter; UserMessages.ToUserID, must be overwritten with UserMessageReplies.ToUserID)



Thanks very much!

Chris

View 4 Replies View Related

Encounter No Parameterless Constructor Defined ... During The OnObjectCreated Of An ObjectDataSource

Apr 3, 2008

I got the following error when trying to pass a parameter from an ObjectDataSource to a BLL during the OnObjectCreated event:No parameterless constructor defined for this object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.MissingMethodException: No parameterless constructor defined for this object.The ObjectDataSource in the aspx is as follows:
<asp:ObjectDataSource ID="LoadData" runat="server" SelectMethod="GetData" TypeName="Export00.Export" OnObjectCreated="SrcObjectCreating">            </asp:ObjectDataSource>
 The code behind in aspx.cs is as follows: 
protected void SrcObjectCreating(object sender, ObjectDataSourceEventArgs e)       
{            Export sqlcommand = new Export("SELECT [DocTitle], [DocID] FROM [Document]");            e.ObjectInstance = sqlcommand;
}  
 The BLL is as follows: Export.cs   (this is the BLL)
namespace Export00{    public class Export    {        private readonly string connString;        private readonly string sqlCommand;public Export(string command)        {    sqlCommand = command;            connString = WebConfigurationManager.ConnectionStrings["MyConnString"].ConnectionString;        }     } 
}Can someone tell me why am I getting this constructor error and how to resolve it? Thanks in advance.sg2000   
 
 
 
 
 

View 3 Replies View Related

Error While Calling The Roles.AddUserToRole (error Message: Cannot Resolve Collation Conflict For Equal To Operation)

Feb 5, 2006

Hi, I have developed a website in asp.net 2. I have tester it and it is working fine on my computer but when I have uploaded it to my server I'm getting an error message when the user signup. The error occurs when I'm setting the user role to 'members'.
 
Error line > Roles.AddUserToRole(user.UserName, "members")
 
The strage thig is that it is working on my computer but not on the server. My home computer and the server are running the same software versions and the website database is the same as well.
 
To double check that my code is not generating the error I have lonched 'SQL Query Analizer' and executed the folowing code on my database:
NOTE: In my database I have create the user “teeluk12� and a role “members�
 
aspnet_UsersInRoles_AddUsersToRoles "/", "teeluk12", "members", "5/02/2006 4:44:33 pm"
 
Once again the code is working on my home computer but not on the server. On the server I'm getting the following error:
 
Server: Msg 446, Level 16, State 9, Procedure aspnet_UsersInRoles_AddUsersToRoles, Line 76
Cannot resolve collation conflict for equal to operation.
 
 
 
Does anybody know what could cause the error?
Could it be some permissions that I didn't set on my server?
 
 
Thanks for my help and suggestions...
Regards,
Gonzal
 

View 9 Replies View Related

Error Calling SQLCLR UDF

Jan 4, 2006

Running SQL Dev Edition on Win2K3 Enterprise Edition. I get the following error.

Msg 6522, Level 16, State 2, Line 2

A .NET Framework error occurred during execution of user defined routine or aggregate 'AddressCorrect':

System.DllNotFoundException: Unable to load DLL 'D:CorrectA.dll': Not enough storage is available to process

this command. (Exception from HRESULT: 0x80070008)

System.DllNotFoundException:

at UserDefinedFunctions.CorrectA(String query, String sentlen, StringBuilder errcode, StringBuilder FirmName, StringBuilder urbanization, StringBuilder Dline1, StringBuilder Dline2, StringBuilder LastLine, StringBuilder Stringaddress, StringBuilder DPC, StringBuilder Checkdigit, StringBuilder cityname, StringBuilder stcode, StringBuilder zip, StringBuilder addon, StringBuilder croute, StringBuilder LACS, StringBuilder LOTsequence, StringBuilder LOTcode, StringBuilder PMB, StringBuilder results, StringBuilder strnum, StringBuilder secname, StringBuilder secnum, StringBuilder countyname, StringBuilder countynum)

at UserDefinedFunctions.AddressCorrect(String inputAddress)

Box has 2GB Ram, with no other processes runing, cant understand why it says out of memory.

Appreciate any insights.

Thanks,
Saptagiri

 

View 11 Replies View Related

Error When Calling Stored Procedure

Nov 12, 2006

I am trying to execute a store procedure from ASP/VB but it fails with the message:
Incorrect syntax near 'InitProject'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: Incorrect syntax near 'InitProject'.Source Error:



Line 24: cmd.Parameters("@ProjectId").Value = 3
Line 25: cn.Open()
Line 26: cmd.ExecuteNonQuery()
Line 27: cn.Close()
Line 28: End Sub
Here is my code:
        'Execute the InitProject stored procedure        'Create the connection from the string in the web.config file        Dim cn As SqlConnection = New SqlConnection(ConfigurationManager.ConnectionStrings("SMARTConnectionString").ConnectionString)        'I want to execute InitProject stored procedure        Dim cmd As SqlCommand = New SqlCommand("InitProject", cn)        'With the parameter @ProjectId = 3        cmd.Parameters.Add(New SqlParameter("@ProjectId", Data.SqlDbType.Int))        cmd.Parameters("@ProjectId").Direction = Data.ParameterDirection.Input        cmd.Parameters("@ProjectId").Value = 3        cn.Open()        'But this fails        cmd.ExecuteNonQuery()        cn.Close()
And my stored procedure is defined as:
[dbo].[InitProject] @ProjectId int -- Add the parameters for the stored procedure hereASBEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT statements. SET NOCOUNT ON;
    -- Insert statements for procedure hereinsert into MATERIAL ( PROJECT_ID, SECTION_ID, CATEGORY_ID, ROOM_ID, ITEM_ID )select @ProjectId, SECTION_ID, CATEGORY_ID, ROOM_ID, ITEM_ID from MATERIAL_TEMPLATEEND
 The store procedure works fine when I do
exec InitProject 3
in sql query.

View 4 Replies View Related

Error In Calling Stored Procedure

Apr 3, 2007

I want to call a stored procedure in ASP.Net 2.0. I've already made sure that the SP contains no error by the Query Analyzer.However, when I try to run this in the ASP.Net application, error occured.This error message is {"Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding."} Calling the SP via a Class1 Public Function ExecuteStoredProcedure(ByVal Name As String, ByVal Para() As String, ByVal Value() As String)
2 If Para.Length <> Value.Length Then Exit Function
3 SqlCmd = New SqlCommand
4 SqlCmd.Connection = SqlConn
5 SqlCmd.CommandText = Name
6 SqlCmd.CommandType = CommandType.StoredProcedure
7 For i As Integer = 0 To Para.Length - 1
8 'SqlCmd.Parameters.AddWithValue(Para(i), Value(i))
9 Dim p As New SqlParameter(Para(i), SqlDbType.NVarChar)
10 p.Direction = ParameterDirection.Input
11 p.Value = Value(i)
12 SqlCmd.Parameters.Add(p)
13 Next
14 SqlCmd.ExecuteNonQuery()
15 End Function
 The Code behind file 1 Protected Sub btnSubmit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSubmit.Click
2 If txtFromDate.Text = "" OrElse txtToDate.Text = "" Then
3 trMsg.Visible = True
4 Exit Sub
5 End If
6
7 Dim ts As New Thread(AddressOf GenerateReport)
8 ts.Start()
9
10 MultiView1.ActiveViewIndex = 1
11 lblConfirmationMessage.Text = "Report generating in progress." & vbNewLine & "You can continue using other functions."
12 End Sub
13
14 Protected Sub GenerateReport()
15 Dim userName As String = CType(Session("User"), clsUser).UserName
16 Dim from As String = txtFromDate.Text
17
18 Dim conn As New clsConnector
19 conn.OpenConnection()
20 'conn.Insert("EXEC gen_report '" + txtReportName.Text + "','" + txtDescription.Text + "','" + userName + "','" + txtFromDate.Text + "','" + txtToDate.Text + "';")
21 conn.ExecuteStoredProcedure("gen_report", _
22 New String() {"@name", "@remark", "@by", "@fromdate", "@todate"}, _
23 New String() {txtReportName.Text, txtDescription.Text, userName, txtFromDate.Text, txtToDate.Text})
24 conn.CloseConnection()
25 End Sub
26
  Thanks!

View 10 Replies View Related

Syntax Error, Calling All SQL Gurus!

Apr 21, 2008

I'm having trouble with the select below. The problem is in the WHERE clause. The Query Builder says this: "Query Definitions Differ. Error in WHERE clause near '('. Unable to parse query text."Here is my code: SELECT Members.MemberID, MemberFamily.FamilyID, MemberFamily.FamFirstName, MemberFamily.FamLastName, MemberFamily.Relation, Members.Street, CASE WHEN MemberFamily.Phone IS NULL THEN (SELECT TOP 1 Phone.Phone FROM Phone WHERE Phone.MemberID = MemberFamily.MemberID) ELSE MemberFamily.Phone END AS Phone, CASE WHEN MemberFamily.Email IS NULL THEN (SELECT TOP 1 Email.Email FROM Email WHERE Email.MemberID = MemberFamily.MemberID) ELSE MemberFamily.Email END AS Email, Checkin.DateFROM MemberFamily INNER JOIN Members ON MemberFamily.MemberID = Members.MemberID INNER JOIN Checkin ON MemberFamily.FamilyID = Checkin.FamilyIDWHERE (SELECT * FROM Checkin WHERE (Checkin.FamilyID = 11) AND (Checkin.Date BETWEEN '02/01/2008' AND '03/01/2008')) AND (NOT (SELECT * FROM Checkin WHERE (Checkin.FamilyID = 11) AND (Checkin.Date BETWEEN '04/16/2008' AND '04/19/2008')))   I can run it without the WHERE clause and it works fine and I can run these arguments separately and they run without errors also:  SELECT *FROM CheckinWHERE (Checkin.FamilyID = 11) AND (Checkin.Date BETWEEN '02/01/2008' AND '03/01/2008') SELECT *FROM CheckinWHERE (Checkin.FamilyID = 11) AND (Checkin.Date BETWEEN '04/16/2008' AND '04/19/2008')    

View 2 Replies View Related

Error (214) When Calling Stored Procedure From Job

Nov 2, 2000

I have some very simple SQL statements in stored procedures. How simple? Try this:
CREATE PROCEDURE [Insert_Inv_LevelA] AS
truncate table BI_Inv_LevelA
insert into BI_Inv_LevelA
select * from Input_Inv_LevelA

I can run the script fine in Query analyser both remotely and from the server console.
When I schedule the script to execute as a step in a job in SQL Server Agent, it falls over and returns the following error (in the step details of the job history):
Cannot convert parameter '@handle' to int data type expected by procedure. [SQLSTATE 42000] (Error 214). The step failed.

Every called SQL script returns an identical error, yet they all parse and run fine in the query analyser.
The syntax of the step is: sp_execute spInsert_Inv_LevelA
This is run as T-SQL on the target database as user dbo (or "(Self)" - the same error occurs either way).

Has anyone come across this before or have any clues? Technet and the MS site say nothing about it that I can find.

Cheers,

Mark.

View 3 Replies View Related

Error Calling RPC To Linked Server

Jan 16, 2004

I am trying to call an RPC from SQL2KSP3 to Sybase ASE 12.5. SQL2K is on an IBM Intel Server running Win2KSP4, ASE is on an IBM RS6000 w/ AIX 5.2.

I have the ASE server set up as a linked server in SQL 2000, and doing queries is working fine, i.e. I can
SELECT * FROM asesrvr.testdb.dbo.tablename
and get back all the data in tablename from the testdb database on the ASE server asesrvr.

However, when I try to run an RPC using the same syntax, I get a generic 7212 error (Could not execute procedure 'procname' on remote server 'asesrvr'. I am calling the rpc with
DECLARE @output char(1)
EXEC asesrvr.testdb.dbo.procname @output output

I'm using Sybase's ASE OLEDB provider; on the Linked Server Properties, I have

General Tab
Product name: asesrvr
Data source: devprod
Provider string: <empty>
Location: greyed out
Catalog: <empty>

Security Tab
One local login, sa, which has impersonate checked as the sa passwords on the two servers are the same (I want to eliminate security as an issue while I try to get this working).

Server Options Tab
Collation Compatible: checked
Data Access: checked
RPC: checked
RPC Out: checked
Use Remote Collation: unchecked
Collation Name: <empty>
Connection Timeout: 0
Query Timeout: 0

SQL2K's @@version is
Microsoft SQL Server 2000 - 8.00.760 (Intel X86) Dec 17 2002 14:22:05 Copyright (c) 1988-2003 Microsoft Corporation Standard Edition on Windows NT 5.0 (Build 2195: Service Pack 4)

Any ideas on how I can troubleshoot this further? It does not appear to be limited to this one procedure (this one only has one output parameter and one line of code, so it's about as simple as it can get for testing purposes). Again, queries work fine, so the linked server itself is connected and working, at least for queries.

Thanks very much for your help,

Vince

View 2 Replies View Related

ASP Error Calling Stored Procedure

Mar 8, 2007

Hi,

I have an ASP program calling a stored procedure. Users enter their data, click submit, and the ASP program calls the SP which inserts the data into the SQL table. Initially it did this without checking for duplicate recs but now I have added code to block dup recs in the stored procedure. The SP is blocking the dups but when it returns to the ASP program I get the error:

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

There was no change of code in the ASP code but it is pointing to a line in that code.
Not sure what is causing this,
Thanks,
J.

View 8 Replies View Related

Error While Calling Oracle Stored Procedure!

Mar 19, 2008

Hi pals,

I am facing problems while calling Oracle stored procedure which has no parameters.

I have used Microsoft OLE DB provider for Oracle.
I have taken one Execute SQL task and set the SQLStatement as
call procedurename


I also set the IsStoredProcedure property to True for Execute SQL task.

Is there any synatx problem?

I am getting an error saying

Error: 0xC002F210 at Call Sp, Execute SQL Task: Executing the query "(call sp_procname)" failed with the following error: "ORA-00928: missing SELECT keyword.


I removed the curly braces for the SQL statement and again ran the Package, i am getting the below error

Executing the query "call sp_procname" failed with the following error: "ORA-06576: not a valid function or procedure name

Can anyone help me out on this regard!
Thanks in advance

View 3 Replies View Related

Error Handling When Calling External Sql-Files

Oct 1, 2005

I am using SQL Server 2000. I have some files with SQL-Statements.The SQL-Serveragent runs jobs which execute the SQL-Files:(e.g. osql /E /n /i \serverd$lager_pool.sql)How can I implement an error handling.If an error occurs, the script stops, and I can't read the variable@errorMy script - table xy doesn´t existSELECT * FROM XYSELECT @@errorSELECT 33The execution stops with an error after the first lineThanks for your help.aaapaul

View 3 Replies View Related

SSIS Calling Web Service Task 401 Unauthorized Error

May 23, 2007

Hello,

I'm pretty stuck on a security issue in SSIS. The web service works by itself, but I can't call it from SSIS, it gives me a 401 unauthorized error. The web service also uses impersonation of my domain admin account.

I have tried the following things:
Setting integrated windows authentication in IIS
Setting the NTFS permissions of those web site directories to EVERYONE
Using a credential / proxy in SSIS and running it from SQL Agent
Changing the log on services of MSSQLSERVER, SQLAGENT, and SQL Integration Services to my domain admin account

I can't get anything to work. What is wrong with this thing? Microsoft's security model has gotten completley out of of hand imo

Also in the security event log it shows all authentication as successful.

View 2 Replies View Related

OLEDB Error Encountered Calling ICommandText:: Execute

Aug 4, 2007

OLEDB error encountered calling ICommandText:: execute ; hr = 0x80040e14 .
SQLSTATE : 42000 , Native Error : 3013
Error state 1 , Severity : 16
Source : Microsoft OLE DB Provider for SQL Server
Error Message : Backup Database is terminating abnormally

View 1 Replies View Related

Error While Calling Oracle Stored Procedure From SSIS !

Mar 19, 2008

Hi pals,

I am facing problems while calling Oracle stored procedure which has no parameters.

I have used Microsoft OLE DB provider for Oracle.
I have taken one Execute SQL task and set the SQLStatement as
call procedurename


I also set the IsStoredProcedure property to True for Execute SQL task.

Is there any synatx problem?

I am getting an error saying

Error: 0xC002F210 at Call Sp, Execute SQL Task: Executing the query "(call sp_procname)" failed with the following error: "ORA-00928: missing SELECT keyword.


I removed the curly braces for the SQL statement and again ran the Package, i am getting the below error

Executing the query "call sp_procname" failed with the following error: "ORA-06576: not a valid function or procedure name

Can anyone help me out on this regard!
Thanks in advance.

View 2 Replies View Related

Calling A .Net Assembly From Script Component Giving Error

Apr 17, 2008

Hi,

I am trying to access a .Net assembly in script component, which internally uses Microsoft Enterpise library dll's.

The problem I am facing is when I copy the config sections needed for the Enterprise library from web.config to dtsdebughost.exe.config file and run the package, It ends in failure with below message
"Error: The script files failed to load."

My dtsdebughost.exe.config looks like below:




Code Snippet
<configuration>
<startup>
<requiredRuntime version="v2.0.50727"/>
</startup>
<configSections>
<section name="loggingConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.LoggingSettings, Microsoft.Practices.EnterpriseLibrary.Logging, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="exceptionHandling" type="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Configuration.ExceptionHandlingSettings, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</configSections>
<loggingConfiguration name="Logging Application Block" tracingEnabled="true"
defaultCategory="" logWarningsWhenNoCategoriesMatch="true">
<listeners>
<add fileName="LogMedtrack-Error.log" rollSizeKB="5000" timeStampPattern="dd-MMM-yyyy"
rollFileExistsBehavior="Overwrite" rollInterval="Day" formatter="Default Formatter"
header="----------------------------------------" footer="----------------------------------------"
listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.RollingFlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
traceOutputOptions="None" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.RollingFlatFileTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
name="Rolling Flat File Trace Listener" />
</listeners>
<formatters>
<add template="Timestamp: {timestamp}&#xA;Message: {message}&#xA;Category: {category}&#xA;Priority: {priority}&#xA;EventId: {eventid}&#xA;Severity: {severity}&#xA;Title:{title}&#xA;Machine: {machine}&#xA;Application Domain: {appDomain}&#xA;Process Id: {processId}&#xA;Process Name: {processName}&#xA;Win32 Thread Id: {win32ThreadId}&#xA;Thread Name: {threadName}&#xA;Extended Properties: {dictionary({key} - {value}&#xA;)}"
type="Microsoft.Practices.EnterpriseLibrary.Logging.Formatters.TextFormatter, Microsoft.Practices.EnterpriseLibrary.Logging, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
name="Default Formatter" />
</formatters>
<logFilters>
<add categoryFilterMode="AllowAllExceptDenied" type="Microsoft.Practices.EnterpriseLibrary.Logging.Filters.CategoryFilter, Microsoft.Practices.EnterpriseLibrary.Logging, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
name="Category Filter" />
<add minimumPriority="0" maximumPriority="2147483647" type="Microsoft.Practices.EnterpriseLibrary.Logging.Filters.PriorityFilter, Microsoft.Practices.EnterpriseLibrary.Logging, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
name="Priority Filter" />
</logFilters>
<categorySources>
<add switchValue="All" name="Tracing">
<listeners>
<add name="Rolling Flat File Trace Listener" />
</listeners>
</add>
</categorySources>
<specialSources>
<allEvents switchValue="All" name="All Events">
<listeners>
<add name="Rolling Flat File Trace Listener" />
</listeners>
</allEvents>
<notProcessed switchValue="All" name="Unprocessed Category" />
<errors switchValue="All" name="Logging Errors &amp; Warnings" />
</specialSources>
</loggingConfiguration>
<exceptionHandling>
<exceptionPolicies>
<add name="Business Policy">
<exceptionTypes>
<add type="System.Exception, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
postHandlingAction="NotifyRethrow" name="Exception">
<exceptionHandlers>
<add logCategory="Tracing" eventId="100" severity="Error" title="Agility Application Log."
formatterType="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.TextExceptionFormatter, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
priority="0" type="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging.LoggingExceptionHandler, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
name="Logging Handler" />
</exceptionHandlers>
</add>
</exceptionTypes>
</add>
</exceptionPolicies>
</exceptionHandling>
</configuration>






Please let me konw, If there is anything wrong I am doing or is there any other way to handle the situation

Regards,
Kalyan

View 1 Replies View Related

Calling GetVirtualInput Within SetUsageType Method Causes Error 0xC0047041 On Return

Apr 18, 2006

I've been trying to create an async transform component and one of the things I'd like to do is add a new output and/or columns to existing outputs for each input column that is selected.
I thought that the SetUsageType method would be a good place to do this as it will allow me to delete output's and columns based on the user's selections but, despite the fact that my code doesn't actually throw or cause errors, when I return from the SetUsageType method I'm informed that error 0xC0047041 (DTS_E_OBJECTNOTINHASHTABLE) has occurred .
I pared the method down to an absolute minimum and found that a call to GetVirtualInput is enough to push it over the edge even if it does nothing! What is wrong here?
Thanks
Charlie

Sample:
public override IDTSInputColumn90 SetUsageType(int inputID, IDTSVirtualInput90 virtualInput,
int lineageID, DTSUsageType usageType)
{

if (usageType == DTSUsageType.UT_READONLY || usageType == DTSUsageType.UT_READWRITE)
{
ComponentMetaData.InputCollection[0].GetVirtualInput();
}

return base.SetUsageType(inputID, virtualInput, lineageID, usageType);;
}

View 9 Replies View Related

Error Running SQL 2005 SSIS Package When Calling It From MS Access

Dec 17, 2007


I am trying to execute an SSIS package from an MS Access 2003 database that imports a table from the Access database into a target table in SQL 2005. I saved the package in SQL 2005 and tested it out. If I run it from the Management Studio Console with Run->Execute ... everything works just fine. However, if I try to run it using "Exec master.dbo.xp_cmdshell 'DTExec /SER DATAFORCE /DTS SQL2005TestPackage /CHECKPOINTING OFF /REPORTING V'" the execution will always fail when the Access database is open (shared mode). It will only work when the Access database is not open. The connection manager looks like this: "Data Source=E:Test.mdb;Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Jet OLEDB:Global Bulk Transactions=1". The error is listed below:

Code: 0xC0202009
Source: NewPackage Connection manager "SourceConnectionOLEDB"
Description: An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available. Source: "Microsoft JET Database Engine" Hresult: 0x80004005 Description: "Could not use ''; file already in use.".


What am I doing wrong?

View 5 Replies View Related

CLR Stored Procedure Calling MS CRM Webservice Failing With Socket Error

Jun 18, 2007



Hi!



I am developing an integration solution for MS CRM.



The basic idea is to have a CLR stored procedure that draws data from a SQL database, transforms the data, and then adds it to MS CRM via the webservice.



When executing the stored proc, it randomly fails (although at approximately the same time, everytime).



This is the error message:



Msg 6522, Level 16, State 1, Procedure add_CCU_information, Line 0
A .NET Framework error occurred during execution of user defined routine or aggregate 'add_CCU_information':
System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: Only one usage of each socket address (protocol/network address/port) is normally permitted
System.Net.Sockets.SocketException:
at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP)
at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception)
System.Net.WebException:
at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest request)
at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest request)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at CRM_Integration.CRM_Service.CrmService.Execute(Request Request)
at StoredProcedures.add_CCU_information()



If someone could please give some advice, I would really appreciate it.



Regards,



Du Toit

View 2 Replies View Related

Access Denied Error When Calling Several SSIS Packages In A Chain

Jun 22, 2007

Hi.

I have problem executing several SSIS-packages in a chain.

To be more precise:
I have implemented a Biztalk 2006 application which via a local webservice executes an SSIS package. The package it self calls another SSIS package, which is located in the same folder as the calling package. The second package then calls a third package etc.

The problem arises, when the first package calls the second package. An Access Denied exception is received. Can any one explain me how to fix this?

The user connected to the application-pool that the weservice is running under, has execution-rights on all of the packages.

Thanks

View 1 Replies View Related

Error With Execute Sql Task And Full Result Set: Not Been Initialized Before Calling 'Fill'

Oct 10, 2006

This is the first time I've tried creating an "execute sql task" with a "full result set".

I've read in the documentation that I must set the resultname to 0, which is done, and that the variable must be of type object. Also done.

[Execute SQL Task] Error: Executing the query "select * from blah" failed with the following error: "The SelectCommand property has not been initialized before calling 'Fill'.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.

Has anyone else had success with a full result set?

Thanks,
-Lori

View 10 Replies View Related

Calling VB Based SQLCLR Function Failed With Error Can't Load System.Web Assembly

Apr 20, 2007

I created a CLR function based on following VB code:



Imports Microsoft.SqlServer.Server

Public Partial Class SqlClrVB

<Microsoft.SqlServer.Server.SqlFunction()> _

Public Shared Function GetTotalPhysicalMemory() As Integer

GetTotalPhysicalMemory = My.Computer.Info.TotalPhysicalMemory

End Function

End Class



The VB code was complied into a DLL called totalmem.dll and call following TSQL to map it into a SQL function:



create assembly totalmem from '!WORKINGDIR! otalmem.dll'

WITH PERMISSION_SET=UNSAFE

go

create function fnGetTotalMem()

returns int

as external name totalmem.SqlClrVB.GetTotalPhysicalMemory

go



When I call this function, it returned following error:

select dbo.fnGetTotalMem()



Msg 6522, Level 16, State 2, Line 0

A .NET Framework error occurred during execution of user defined routine or aggregate 'fnGetTotalMem':

System.IO.FileNotFoundException: Could not load file or assembly 'System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

System.IO.FileNotFoundException:

at Microsoft.VisualBasic.MyServices.Internal.ContextValue`1.get_Value()

at My.MyProject.ThreadSafeObjectProvider`1.get_GetInstance()

at SqlClrVB.GetTotalPhysicalMemory()

.



Anyone knows why I'm hitting this error? I didn't reference any System.Web interface why it needs to load System.Web assembly? The same code runs OK if I compile it as a separate VB application out side of SQL Server 2005.



Thanks much,



Zhiqiang

View 2 Replies View Related

Expression Evaluation Caused An Overflow Error When Calling ExecuteResultSet(SqlServerCe.ResultSetOptions.Scrollable)

Oct 19, 2007

Hello

When I call ExecuteResultSet(SqlServerCe.ResultSetOptions.Scrollable) I am getting the following error when the data type is Numeric(18, 4):
Expression evaluation caused an overflow. [ Name of function (if known) = ]

The numbers involved are not that big and work fine when ExecuteReader() or ExecuteResultSet(SqlServerCe.ResultSetOptions.None) are called on the same SQL.

Any ideas? Thanks in advance!

Cheers,
Dave

Code:
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim errorDescription As String = String.Empty
Dim numericNumber As String = String.Empty
Try
Using sqlCE As New System.Data.SqlServerCe.SqlCeConnection("Data Source = '" & My.Application.Info.DirectoryPath & "MyDatabase.sdf';")

sqlCE.Open()

Dim sqlCECommand As SqlServerCe.SqlCeCommand = sqlCE.CreateCommand()
sqlCECommand.CommandText = "SELECT SUM(MT.TPM_Measure1) AS CurrentAmount FROM BUS_Table MT"

System.Diagnostics.Debug.WriteLine(sqlCECommand.CommandText)

Dim reader As System.Data.IDataReader = Nothing
If RadioButton1.Checked Then
reader = sqlCECommand.ExecuteReader() 'Works fine
ElseIf RadioButton2.Checked Then
reader = sqlCECommand.ExecuteResultSet(SqlServerCe.ResultSetOptions.None) 'Works fine
Else
reader = sqlCECommand.ExecuteResultSet(SqlServerCe.ResultSetOptions.Scrollable) 'Causes the error!
End If

If reader.Read() Then
numericNumber = reader(0).ToString()
End If

reader.Close()
reader.Dispose()
End Using
Catch ex As Exception
errorDescription = ex.Message
Finally
Me.lblError.Text = errorDescription
Me.lblNumeric.Text = numericNumber
End Try
End Sub

TPM_Measure1 datatype is Numeric(18,4)

When the above query works the value is: 4053723.6300

View 18 Replies View Related

Calling DTS From C#

Oct 25, 2006

Hi all, i have a DTS package that i call from a C# app, i had it working great until i decided to use an activeX script to do the data transformations instead of the row copy.  I need to use ActiveX to add a standard name to the last column in the destination table.  the problem is the task is executing without errors (from c#) but nothing is happening, its failing silently.  If i modify the Data Transformation back to a standard column mapping (with separate DTSTransformations for each column) it works fine, but as soon as i use activeX to handle the transformations it doesn't work.  Can anyone tell me what i may be doing wrong. heres the calling code from C# if(f.Name.Substring(13,7).ToLower() == "product")
{
try
{
activity.Log("Starting Product DTS Package...");
DTS.Package2Class package = new DTS.Package2Class();
object pVarPersistStgOfHost = null;
package.LoadFromSQLServer(
"192.168.8.8",
"username",
"thepassword",
Microsoft.SqlServer.DTSPkg80.DTSSQLServerStorageFlags.DTSSQLStgFlag_Default,
null,
null,
null,
(string)ConfigurationSettings.AppSettings["productDTSPackage"],
ref pVarPersistStgOfHost);
package.GlobalVariables.Item(1).Value = f.FullName.ToString();
package.Execute();
package.UnInitialize();
//force release of COM object
System.Runtime.InteropServices.Marshal.ReleaseComObject(package);
package = null;
}
catch(Exception e)
{
activity.Log(string.Format("Failureprocessing {0}",WorkingPath + f.Name) +" - "+ e.Message);
} and the activex i tried to use for the transformations is: '**********************************************************************'  Visual Basic Transformation Script'************************************************************************'  Copy each source column to the destination columnFunction Main() DTSDestination("Yesmail Id") = DTSSource("product series") DTSDestination("Customer CKM CustId") = DTSSource("product family") DTSDestination("Product SKU") = DTSSource("transaction date") DTSDestination("product model name") = DTSSource("serial number") DTSDestination("serial number") = DTSSource("product model name") DTSDestination("transaction date") = DTSSource("Product SKU") DTSDestination("product family") = DTSSource("Customer CKM CustId") DTSDestination("product series") = DTSSource("Yesmail Id") DTSDestination("fileName") = DTSGlobalVariables("sourceFile").Value  <-- this is why im using the activex for this field to get a Global Variable.  Main = DTSTransformStat_OKEnd Functionthe weird thing is the PACKAGE runs fine from ENTERPRISE MANAGER with this activex, it just doesn't do it from my Calling app, perhaps i have missed something i need to change in the package constructor? BTW: i do have my assembly signed in C# for the COM wrapper.thanks in advance, mcm

View 1 Replies View Related

Calling A SP

Jan 6, 2008

Hello,
I have done extensive work with Classic ASP for 9 years now. Working with Stored Proceedures etc
However now am working in c# am adviced by a friend that its best to use the
1. The "Object data source" to call SP
2. Are there any documentations pointers on best practices, how its done ?
I want to use the "on click event" in my class file.
thanks
Ehi

View 3 Replies View Related

Calling A SP In .net

Jan 9, 2008

Hello,
are there any sample codes that show you how to execute a SP in .net
1. Using a class
2. Calling the class in the onlick_button function ?
thanks
Ehi

View 1 Replies View Related

Calling SP From SP

Jan 20, 2004

I'm developing a new Stored Proc that will be taking information in to enter customer and order info. Looking at the current Stored Proc its using alot of If statements and I'm thinking of breaking the sp up into different Stored Procs and calling them all from One main stored proc. I know how to do this but I was wondering how it would effect performance. So should I simply keep all the stuff in one proc or module it out into multiple ones to make it easier to follow and read?

Thanks

View 1 Replies View Related

Example Of A Sp_ Calling Another Sp_.

Sep 18, 1998

Does anyone have an example of a Stored Procedure calling
another stored procedure and passing it parms.

What I would like to do is: Have a stored procedure select
data from a table and pass that data to another stored
procedure.


Thanks in advance,

Rodney

View 3 Replies View Related

Calling SP

Sep 14, 2007

Hi,
Can I call SP in the Trigger? Googled for this but din gt any satisfactory answer.




Thnkx,
Rahul Jha

View 13 Replies View Related

Calling One SP From Another SP

Mar 26, 2008

I'm working in SQL Server 2005. I have an existing SP that does exactly what I need (it's the aspnet_UsersInRoles_IsUserInRole SP). I want to reuse this SP and use it's return value as a field in the SP I'm writing. How do I go about doing this? I could take the logic out of the called SP and wrap it in a function; but, I would really like to reuse the SP aspnet_UsersInRoles_IsUserInRole. Thanks in advance for any assistance.

View 7 Replies View Related

Calling A Dts Package From VB.NET

Jan 8, 2007

hi,
i'm trying to call a dts package from vb.net.
i got 2 examples which both don't work.
first one gives me a [DBNETLIB][ConnectionOpen(Connect()).]SQL Server does not exist or access denied error.
source code:Dim serverName As String = "SERVERNAME"Dim oPackage As New DTS.Package()Dim oStep As DTS.StepDim pVarPersistStgOfHost As Object = Nothing
oPackage.LoadFromSQLServer(serverName, "USERID", "PASSWORD",     DTSSQLServerStorageFlags.DTSSQLStgFlag_Default, _  "DTSPASSWORD", Nothing, Nothing, "DTSPACKAGENAME", pVarPersistStgOfHost)
For Each oStep In oPackage.Steps      oStep.ExecuteInMainThread = TrueNext
oPackage.Execute()
Dim err As LongDim source, description, message As StringFor Each oStep In oPackage.StepsIf oStep.ExecutionResult = DTSStepExecResult.DTSStepExecResult_Failure Then        oStep.GetExecutionErrorInfo(err, source, description)        message = String.Format("ErrorCode: {0}, Source: {1}, Description: {2}", err.ToString(), source,                              description)Else         message = "Success"End IfNext
oPackage.UnInitialize()oPackage = Nothing
second example tries to create a dts package dynamically. this time i get the error that the CustomTask can not be casted, somehting about the QueryInterface.
source code:Dim oPackage As New Package2()Dim oConnection As Connection2Dim oStep As Step2Dim oTask As TaskDim oCustomTask As BulkInsertTask
oConnection = oPackage.Connections.[New]("SQLOLEDB")oStep = oPackage.Steps.[New]()oTask = oPackage.Tasks.[New]("DTSBulkInsertTask")oCustomTask = CType(oTask.CustomTask, BulkInsertTask) <-- error
With oConnection       .Catalog = "CATALOG"       .DataSource = "SERVERNAME"       .ID = 1       .UseTrustedConnection = True       .UserID = "USERID"       .Password = "PASSWORD"End With
oPackage.Connections.Add(oConnection)oConnection = Nothing
With oStep        .Name = "InsertGemal"        .ExecuteInMainThread = TrueEnd With
With oCustomTask        .Name = "InsertGemal"        .DataFile = "D:ImportGemal.dat"        .ConnectionID = 1        .DestinationTableName = "Gemal"        .FieldTerminator = ";"        .RowTerminator = "
"End With
oStep.TaskName = oCustomTask.Name
With oPackage        .Steps.Add(oStep)        .Tasks.Add(oTask)        .FailOnError = TrueEnd With
oPackage.Execute()
oPackage.UnInitialize()oPackage = Nothing
any help highly appreciated!
t.i.a.,ratjetoes.

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved