how can i fix my invalid procedure call error

Last post 07-03-2009 8:58 AM by young345. 2 replies.

Sort Posts:

  • how can i fix my invalid procedure call error

    07-03-2009, 5:26 AM
    • Member
      53 point Member
    • young345
    • Member since 02-04-2008, 11:32 AM
    • Posts 340

    Hi

     

    I am trying to pass values via my code. All the values I have are string.

    My code looks like this

     

    anceClass moAss = new anceClass();

            Boolean isValid;

     

            isValid = moAss.Save("121", "6236384", "R0009052", "03/07/2009", "0", "48.00", "2.4", "5", "0", "0", "False", "False", "False", "False", "False", "False", "True", "False", "0", "False");

     

    However, when u go to pass my values I get the following error message:

     

    Invalid procedure call or argument.

     

    Check the ErrorCode property of the exception to determine the HRESULT returned by the COM object

     

    The error at the moment is pointing at 0 after the date (the fifth value)

    I am using c#. please any help on this as I am new to programming and cant see where I am going wrong.

    I have tried to pass through different values but its always throwing this error.

     

    Thanks

  • Re: how can i fix my invalid procedure call error

    07-03-2009, 7:29 AM
    • Member
      315 point Member
    • sureshmdb
    • Member since 05-27-2008, 12:18 PM
    • Baleru
    • Posts 61

     Hi Yong,

          you can put brake point at isvalid=moAss("","",........); use try catch blocks,can you send me the code of that Save method

    Suresh Mediboyina



    Mark as answer if my response is useful to you.
  • Re: how can i fix my invalid procedure call error

    07-03-2009, 8:58 AM
    • Member
      53 point Member
    • young345
    • Member since 02-04-2008, 11:32 AM
    • Posts 340

    this is my code, thanks 

     

     

       protected void TanceInsert_Click(object sender, EventArgs e)

        {

            Stopwatch stopWatch = new Stopwatch();

            stopWatch.Start();

     

            TanceClass moAss = new TanceClass();

            //Recordset rs;

            Boolean isValid;

     

            isValid = moAss.Save("284630", "6236390", "71140", "2009-07-03", "0.00", "48.00", "2.40", "5", "0.00", "0", "0", "0", "0", "0", "0", "0", "1", "0", "0.00", "0" );

           

            stopWatch.Stop();

            // Get the elapsed time as a TimeSpan value.

            TimeSpan t = stopWatch.Elapsed;

     

            lblStopWatch5.Text = String.Format("Time took is {0}:{1}:{2}:{3}", t.Hours, t.Minutes, t.Seconds, t.Milliseconds);

     

     

        }

Page 1 of 1 (3 items)