.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

So how do you use or code the POWER function when the value is negative?

Posted By:      Posted Date: September 29, 2010    Points: 0   Category :Sql Server

I am writing complex code when I got the error message
 Msg 3623, Level 16, State 1, Line 1
 A domain error occurred.

I realized that the value that I was passing was negative.
For example:  select (POWER(-0.37,.5))

So how do you use or code the POWER function when the value is negative?



View Complete Post

More Related Resource Links

Wicked Code: Power Programming Tips for ASP.NET 2.0


In the February 2005 issue, I introduced five lesser-known features of ASP. NET 2. 0 that have the potential to make a significant impact on the security, performance, and robustness of your code (see Wicked Code: Five Undiscovered Features on ASP.

Jeff Prosise

MSDN Magazine June 2005

Creating Code Function or Assemblies to manipulate Dataset

Folks In SSRS the dataset, can it be send to a Code function for further manipulation of the data ? For example, In SSRS I have a Column of Data and I want to passed it to a Code Function, and the code function for certain values and perform some Engineering calculation, and the function than return a modififed dataset. Can I do this ? Thanks in Advance  

Calling Serverside PageMethod function from an external page Client Side Code ?

there is many examples on the net about this issue .like this :http://sappidireddy.wordpress.com/2008/03/31/how-to-call-server-side-function-from-client-side-code-using-pagemethods-in-aspnet-ajax/But all javascript codes are in same aspx file including codebehind WebMethodsI wantto call a pagemethod from a js which is in another page.something like this : (javascript code but not in same aspx)PageMethods("www.externalpage.com").GetContactName(ctrl.value, CallSuccess, CallFailed, dest)).or calling WebMethods from javascript must only be defined in codebehind with linked aspx fileonly avaible in same aspx ?cant I call a Webmethod in a.aspx from a javascript in b.aspx ?any clue ?thanks.

Can you call a javascript function from code behind?

Call you cal a javascript function from the code behind? If so how??? 

execute a javascript function in code page

I use js function in source page and call that js function as below in Source page<a href="javascript:;" onclick="openwin('Sample.aspx?DID=<%#Eval("UID") %>', '', '700','300','yes'); return false ">I need to call this function from vb.net code page.....how to solve this ........???????????Give ur ideas...............

Power Function in SQL

Hi, i have function to calculate XIRR in sql server 2005. In this function power function is to be used. but it will gives me an error when i do power of such this values which are POWER (-0.01259,0.14873) Thanks in AdvanceMaulik A. Dusara Tech Lead.

Calling function from code behind


 I need help putting together code that would call the below Java function in asp vb 2008. Thank you.


<script type="JavaScript">
     function OnBeginRequest(sender, args)

Server Side Code Not Firing After Javascript Function


I have a group of buttons and a text box which I have been using for paging. The user is able to type a number into the text box and either click the "Go" button or hit "Enter" for the paging to occur. To have the "Enter" button work I had to turn the "UseSubmitBehavior" property to false for all of the buttons except the "Go" button.

Now I am trying to add a javascript function that shows a confirm box when the user clicks on a paging button. If the function returns true, the client side code should run. If the function returns false then nothing else should run. I have been successful with getting this to work for the "Go" button but it won't work for any of the other paging buttons because I have "UseSubmitBehavior" set to false. Can anyone think of a way to get this to work with the other buttons?

Thanks in advance for the help.

<asp:Button ID="btnFirstPage" runat="server"  Text="<<"  OnClick="PagerClicked" OnClientClick="return unsavedChanges();" UseSubmitBehavior="false" />
<asp:Button ID="btnPreviousPage" runat="server"  Text="<"  OnClick="PagerClicked" OnClientClick="return unsavedChanges();" UseSubmitBehavior="

how to include javascript function in code-behind


I'd like to include the following javascript in code-behind with the "ScriptManager.RegisterClientScriptBlock" feature.  Any ideas?

<asp:RadioButtonList ID="rblGender" onchange="ToggleTextBox(this);" runat="server" />
    <br />
    <asp:TextBox ID="txtMaiden" runat="server" />

<script type="text/javascript">
        function ToggleTextBox(Source) {
            if (Source.selectedIndex == 2)
                document.getElementById('txtMaiden').style.display = 'block';
                document.getElementById('txtMaiden').style.display = 'none';

Pass string to Javascript function from code-behind...



I'm trying to send a error message to a javascript function from code-behind, but it's not working. When the javascript is executed the output error is: [object Object]

Here's my Javascript:

function Error(error) 
            document.getElementById("<%= errorText.ClientID %>").innerText = error;

And my C#:

        textError = "This is not working!!!";

        ScriptManager.RegisterStartupScript(Page, this.GetType(), "Error", "javascript:Error('" + textError + "');", true);                

Even if i pass the string instead of the 'textError' variable i still get the same error :(

Can anyone help me?

How to exec Code behind function in javascript


I had a custom confirm box Using Jquery....In that It crates two buttons Yes and No.

I need to execute my code in Yes click.....how?????

how write code in my javascript function and modify it?


hi there
i have a function in my javascript code:

   <script language="Javascript">
  function showAddress(address)

          if (geocoder) 

actually, i set GeoMap variable from asp.net
the problem is that when GeoMap change value, the script does not change!
so, the button who change this value is in a UpdatePanel, does this got problem?

how can i do this?

Launching a javascript function from code behind


I need to build a javascript fucntion from the server side code-behind. I can't do it with setting any attributes, because the launching of the script depends upon a variable inside the server side text changed event (which at that time is too late for an attribute setting).

From inside that server event, if a certain value is retrieved, I should call the javascript fucntion. The function to be built should look something like this.

function openPri1Srch(btn, id, wind) {
    var hdnbfiPriCount = document.getElementById("hdnbfiPriCount");

    if (hdnbfiPriCount.value != "1") {
        curRow = btn;
        var oWnd = radopen("../xref/billingPatientDemoInsuranceSearch.aspx?id=" + id, wind);
        oWnd.setSize(1000, 400);

I just don't know how to actually build the function (syntax with the quotes, etc.) I will have the follow

C# Insert string from code behind to javascript function


Hi I am using the FullCalendar plugin and I am wanting to load events from the db to the page.

In my codebehind I have a string built up of the events which need to be included.

And I need it to be inserted into the javascript function in the position shown below:

Any help???

For example:

string Calevent = "{ title: 'Click for Google', start: new Date(y, m, 28), end: new Date(y, m, 29),url: 'http://google.com/'}";

$(document).ready(function() {
        var date = new Date();
        var d = date.getDate();
        var m = date.getMonth();
        var y = date.getFullYear();

        var calendar = $('#calendar').fullCalendar({
            header: {
                left: 'prev,next today',
                center: 'title',
                right: 'month,agendaWeek,agendaDay'

Negative Lookbehind assertion to find all the strings from source code of particular pattern

I wrote a regular expression to match all the double quoted strings in the source code but excluding those which are initializers to const declaration.

My expression was 

The first group is const declaration of string type. Second is used to match double quoted strings capable of handling escape sequences.


If i simple run a match using second group, all the strings are matched. But if i use the entire expression, it provides me all the characters between the end double quote of last string and first double quote of next string.

Please help.


Execute a JavaScript function from code behind


Hi All,

I have implemented the following progress bar;


It works very well apart from i have a link on the Gridview which opens a ModalPopUp.  On the popup i have a close button which runs ModalPop.hide();  However the Progress Bar stays on the screen and I can't get rid of it??  This only happens when i have opened the Modal Popup - if i do a gridview sort the progress bar opens and hides as it should.

I have tried to execute the Java "OnUpdated" command like such but it dosent work either:


ClientScriptManager script = Page.ClientScript;

        if (!script.IsClientScriptBlockRegistered(this.GetType(), "Popup"))

            script.RegisterClientScriptBlock(this.GetType(), "Popup", "<script type=text/javascript>onUpdated();</script>");



 Thanks all

Problem in calling javascript function from code behind


Hi All,

  how can i call Javascript function on Button click after doing some server side operation?

  Though i am using ClientScript.RegisterStartupScrip(), sometime it is working(for alert) but when i am using for display confirm message it is not showing Confirm message.

ClientScript.RegisterStartupScript(GetType(), "ConfirmMessage", "javascript:return ConfirmMessage('" + lMessage + "');");

this is not working.

Please help me out.

Thanks & Regards,



ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend