Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8137025
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T10:57:14+00:00 2026-06-06T10:57:14+00:00

I have one project inside that I have SqlServerFunctions in test.cs file. code: [Microsoft.SqlServer.Server.SqlFunction]

  • 0

I have one project inside that I have SqlServerFunctions in test.cs file.
code:

    [Microsoft.SqlServer.Server.SqlFunction]
    public static SqlDecimal CalculateBondDV0N(SqlDecimal coupon, SqlDecimal yield, SqlDateTime date)
    {
        DayCount dayCount = (DayCount)Enum.Parse(typeof(DayCount), dayCountString.ToString(), true);
        Frequency frequency = (Frequency)Enum.Parse(typeof(Frequency), frequencyString.ToString(), true);

        double price = BondAnalyticsUtility.CalculateDV0N((double)coupon.Value, dayCount, frequency, (double)yield.Value, date.Value, finalPaymentDate.Value, (double)redemptionValue.Value, (double)notional.Value, (double)spreadChange.Value);

        SqlDecimal returnVal = new SqlDecimal(price);

        return returnVal;
    }

And this function get called from Sql Server inside Scalar valued function by giving EXTERNAL parameter.

ALTER FUNCTION [dbo].[CalculateBondDV0N](@Coupon [decimal](18, 6), @Yield [decimal](18, 6), @Date [datetime])
RETURNS [decimal](18, 7) WITH EXECUTE AS CALLER
AS 
EXTERNAL NAME [Pearl.Analytics.Services.Database].[BondAnalytics].[CalculateBondDV0N]

I want to debug this function the code is in c# trying to debug in into VS2010 pro
how can i attached it with database and do this.?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T10:57:16+00:00Added an answer on June 6, 2026 at 10:57 am

    If you don’t need to debug it within SQL Server, then it’s quite easy to just call it naturally from normal C# code. Seeing as your method only makes use of very basic types, I can’t see any reason to need to debug it within SQL Server.

    I am not sure where ‘dayCountString’ and ‘frequencyString’ come from, however. I have a suspicion that those should be parameters to the function too.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a products.jar file. Inside that there is one class com.ClassA . The
I have one project which has RIAService with entity framework that is referenced to
I have one file in my project, (the readme file,) which I would like
I have one OPC ( OLE for Process control ) server project which is
I have one lib/ folder inside my Eclipse Plugin Project and on this folder
I have one main page in my Silverlight project. I have two frame inside
We have an ASP.Net ScriptControl that is shared between web app projects. One project
I have an SVN repository containing multiple top-level folders, one per project. Inside each
I have one project with is developed in Php and javascript. How to open
Let's say I have one project with the following POM: <groupId>com.mine</groupId> <artifactId>coreJar</artifactId> <packaging>jar</packaging> <version>0.0.1-SNAPSHOT</version>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.