SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 4 of 4
  1. #1
    Apprentice
    Join Date
    Jul 2009
    Location
    India
    Posts
    38
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    A general error occurred while adding parameter

    Hi,

    I'm getting the following error message on trying to add a new column and value for that column in the global data sheet.

    What the function does is it checks for existing column name in global data sheet, if the column name passed already exist, it update the new value with current value. If it does not exist then it create a new column and update the value passed.

    ' Function Call
    Common_UpdateDataInGlobalSheet "Select_Currency", strCurrenyDisplayed '' Sucessfully added the data table and value passed to global data sheet
    Common_UpdateDataInGlobalSheet "Select_Total_Amount", strTotalValue '' Here it throws error

    Error Message: "A general error occurred while adding parameter <Select_Infant_Amount>."
    Eror Number: -2147418113

    p.s. Already a function loads the required data into global data sheet, and it has around 15 columns with value.

    Error get generated exactly at line
    '----------------------------------------------
    ' Function
    '-----------------------------------------------
    Public Function Common_UpdateDataInGlobalSheet(ipStrColumnName, ipStrColumnValue)

    On Error Resume Next

    Dim intColumnCount, intLoop, blnColumnAlreadyExist

    blnColumnAlreadyExist = False

    ipStrColumnName = Trim(ipStrColumnName)
    ipStrColumnValue = Trim(ipStrColumnValue)

    If ipStrColumnName = "" Then
    Exit Function
    End If

    intColumnCount = DataTable.GetSheet("Global").GetParameterCount
    For intLoop = 1 to intColumnCount
    If ipStrColumnName = Trim(DataTable.GetSheet("Global").GetParameter(int Loop).Name) Then
    blnColumnAlreadyExist = True
    Exit For
    End If
    Next

    If blnColumnAlreadyExist Then
    DataTable.Value(ipStrColumnName) = ipStrColumnValue
    Else
    DataTable.GlobalSheet.AddParameter ipStrColumnName, ipStrColumnValue ' Exact line where aove mentioned throws.
    End If

    End Function

    Please let me know your suggestions on this one.

    - Siva

  2. #2
    Moderator
    Join Date
    Jul 2005
    Location
    Delhi
    Posts
    15,575
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    7 Thread(s)
    Total Downloaded
    0

    Re: A general error occurred while adding parameter

    See if the below approach helps

    http://knowledgeinbox.com/articles/q...rameter-exist/

    ?

  3. #3
    Apprentice
    Join Date
    Jul 2009
    Location
    India
    Posts
    38
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: A general error occurred while adding parameter

    Hi Tarun,

    I will try this out in my code. To my surprise i just logged off my laptop and came back home and restarted the laptop and run my script it working perfectly.

    Not sure, i run my script so many times and it's working perfectly.

    Any idea of wat could have caused the problem that time..

    - Ramkumar

  4. #4
    Moderator
    Join Date
    Jul 2005
    Location
    Delhi
    Posts
    15,575
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    7 Thread(s)
    Total Downloaded
    0

    Re: A general error occurred while adding parameter

    Happens all the time, no reasons behind few things except bad times [img]/images/graemlins/laugh.gif[/img]

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 12.50%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 07:00 PM.

Copyright BetaSoft Inc.