Error:Ref cound more than 1 when add the field

hai,
I got the error like "Ref cound more than 1" when i add the field in the table.I use this fuction
Public Function createUserFields(ByVal tablename As String, ByVal fieldName As String, ByVal fieldDescription As String, ByVal dataType As SAPbobsCOM.BoFieldTypes, Optional ByVal dataSize As Long = 0, Optional ByVal subType As SAPbobsCOM.BoFldSubTypes = SAPbobsCOM.BoFldSubTypes.st_None, Optional ByVal linkedTable As String = "") As Boolean
Dim v_UserField As SAPbobsCOM.UserFieldsMD
Dim v_RetVal As Long
Dim v_ErrCode As Long
Dim v_ErrMsg As String = ""
Try
createUserFields = False
If Not UserFieldExists(tablename, fieldName) Then
app.StatusBar.SetText("Creating Table " + tablename + " ...... :> Adding Field: " & fieldName & " - " & fieldDescription, SAPbouiCOM.BoMessageTime.bmt_Long, SAPbouiCOM.BoStatusBarMessageType.smt_Warning)
v_UserField = com.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserFields)
v_UserField.TableName = "@" + tablename
v_UserField.Name = fieldName
v_UserField.Description = fieldDescription
v_UserField.Type = dataType
If dataType = SAPbobsCOM.BoFieldTypes.db_Alpha Then
v_UserField.Size = dataSize
End If
If Not (subType = SAPbobsCOM.BoFldSubTypes.st_None) Then
v_UserField.SubType = subType
End If
If linkedTable "" Then v_UserField.LinkedTable = linkedTable
' If Not (v_progressBar Is Nothing) Then v_progressBar.Text = tablename + ":> " + "Adding Field:> " & fieldName & " :> " & fieldDescription
v_RetVal = v_UserField.Add()
If v_RetVal = 0 Then
createUserFields = True
Else
com.GetLastError(v_ErrCode, v_ErrMsg)
app.StatusBar.SetText("Failed to add UserField " & fieldName & v_ErrCode & " " & v_ErrMsg, SAPbouiCOM.BoMessageTime.bmt_Medium, SAPbouiCOM.BoStatusBarMessageType.smt_Error)
End If
System.Runtime.InteropServices.Marshal.ReleaseComObject(v_UserField)
v_UserField = Nothing
GC.Collect()
End If
can any one help me?
Regards,
Ramya.s

HI
In 2007 i always got the same problem.
Solution:
1st create all tables
then
2nd create all fields
and do not use any querys to exists the table or field
>If Not UserFieldExists(tablename, fieldName) Then
use lretcode when you add the field / Table, even it is -2035 it is already exists, do not care.
'... your original code
            If v_RetVal <> 0 Then
                Select Case v_RetVal
                    Case -2035 'means already exist
                    Case Else
                        com.GetLastError(v_ErrCode, v_ErrMsg)
'... your original code
                End Select
            End If
Only this way was working for me....
Regards,
J.
Edited by: Janos  Nagy on Jul 30, 2008 2:58 PM

Similar Messages

  • I am using iPhoto 11 mail and cannot add more than one recipient in the 'to' line.  When I put a comma in, the recipient's address is deleted.  If I use ' ' with more than one recipient the save grays out.  Any thoughts?

    am using iPhoto 11 mail and cannot add more than one recipient in the 'to' line.  When I put a comma in, the recipient's address is deleted.  If I use '< >' with more than one recipient the save grays out.  Any thoughts?

    I figured it out.  I needed to fix some errors in my account information.  It works fine now.

  • Error: An attribute cannot appear more than once in the same start tag

    Hi Everyone,
    when i run the page sometimes it works fine but sometimes it throws Compilation Error as below.
    "Error(502,1224): file:/C:/Jdeveloper/jdevhome/jdev/myhtml/OA_HTML/fwk/t/Session_2055663493/region1.uix<Line 502, Column 1224>: XML-20124: (Fatal Error) An attribute cannot appear more than once in the same start tag."
    And i delete the particular file from the path and run the page so this time it works fine.
    But later after sometime i get the same error but the session number will be changed, then again i need to delete it and run.
    What can be the permanent solution for this issue?
    Plz let me know any suggetions.
    Thanks.

    Seems like the mdl file is corrupted or was not generated correctly.
    Can you try to create the mdl file again and then try the import ?
    If it doesn't work then try contacting Oracle Support.

  • Does Hotmail have an attachment size limit? When i attach something with more than 3mb in the mail it isn't send. It gives a resize option.

    Does Hotmail have an attachment size limit? When i attach something with more than 3mb in the mail it isn't send. It gives a resize option.

    Hi. Txs. The problem is that in my pc the limit size is 25mb. But in my ipad the mail only sends files under 3mb.

  • I don't load music, only audio books.  When I have a book that is more than 1 disk, the tracks are named different, (eg track 01 etc., on disk 1, then disk 2  are named 1a, 1b, etc.) , so  when synced it is all jumbled 01, 1a, 02, 2a ect. Help?

    I don't load music, only audio books.  When I have a book that is more than 1 disk, the tracks are named different, (eg track 01 etc., on disk 1, then disk 2  are named 1a, 1b, etc.) , so  when synced it is all jumbled 01, 1a, 02, 2a ect. Help?

    See this page from another forum member turingtest2. He might even chime in here if he sees it to offer any additional advice.
    Audiobooks on iPods
    B-rock

  • MORE THAN 1 OF THE DETAIL FOLDERS USES NON-AGGREGATED ITEMS

    What does this join configuration message mean? I am a user not an administrator but I notice that sometimes I get this message when I am trying to create reports in Discoverer.
    Currently I have a report that is using a control table and a detail table. I need to link to another table (not a detail table). The join did not exist but I was able to take a transaction and join to the table with sql. I asked that this join be created in Discoverer so I can link to the other table in the report and it was created, but when I go to pull in the field I need I get this message:
    Join configuration cannot be resolved. Reason: more than 1 of the detail folders uses non-aggregated items.
    Can this be resolved and if so how? We seem to get this message fairly often.

    I am always leery of disabling fan traps, as it can cause errors with aggregation (and by errors, I mean including values multiple times). Make sure you check the documentation (the Disco user guide) for an explanation of fan traps, and the types of problems that can occur, and the check the results of your queries (or have the data owners do it) to make sure the results are valid.
    I use the fan trap warning as an indication that there is something amiss in the BA, and then try to find the problem there. Sometimes the solution is changing a join (you can check the box that states there is a 1 to 1 relationship and that will also eliminate the fan traps), other times it is creating a view or custom/complex folder to specify how the data is to be joined. Rarely is the only solution to disable fan traps (and while I am on my soapbox, I'll add that I use it as a last resort).
    Sometimes removing fan traps is the correct solution, but you need to test your reports to make certain the results are valid.

  • CRS Install hostname being used by more than once for the same node.

    Hi, we're installing The Oracle Clusterware and on the Cluster Configuration screen of the universal Installer (the one were you specify the clustername and clusternodes) we get the following error message in a dialog box when the next button is clicked:
    "You must enter unique values for the public node name, the private node name and the virtual hostname for all nodes in the cluster. The name, node1, that you entered is being used by more than once for the same node."
    Has anyone experienced this error message before and know what the cause is?
    Could it be a problem with the /etc/hosts file?
    Thanks in advance,
    M

    Make sure you allocate separate IP addresses on your network for the VIP addresses on each RAC node (this is not the same as the machine IP already configured on the OS).
    Also, the installer may complain if your private and public IPs are configured under the same subnet.
    Finally, as mentioned before, check that name resolution for all the IPs to be used. On all RAC nodes, your /etc/hosts file should be configured with:
    - public name and IP addresses of ALL nodes
    - private name and IP addresses of ALL nodes
    - VIP name and IP addresses of ALL nodes
    Hope that helps
    B.

  • CMDGW_CAT:3441: ERROR: Cannot have more than 3 entries in RACCESSPOINT LIST

    Hi,
    i have tuxedo 8.1 in HP-UX.
    In the section of my dmconfig i have:
    SERVICEF LDOM=DOMLOCAL RDOM=WTC1,WTC2,WTC3,WTC4
    I have this error when i tried to compile with dmloadcf -y dmconfig:
    Invalid value
    CMDGW_CAT:3441: ERROR: Cannot have more than 3 entries in RACCESSPOINT LIST
    CMDGW_CAT:1546: ERROR: dmloadcf: Above errors found during syntax checking
    can I increase the value of the parameter RDOM over 3?
    How?
    thanks...

    Hi,
    The syntax:
    service LDOM=local_domain RDOM= dom1,dom2,dom3
    defines failover remote domains for that particular import. It's not meant to provide access to a service in multiple domains. What you want is basically what you did, i.e.,
    service LDOM=local_domain, RDOM=dom1,dom2
    service LDOM=local_domain, RDOM=dom2,dom3
    service LDOM=local_domain, RDOM=dom3,dom4
    service LDOM=local_domain, RDOM=dom4,dom1
    This would provide load balancing across the 4 domains, and still provide failover domains, although if the connection policies are set to ON_STARTUP, then the following is sufficient:
    service LDOM=local_domain, RDOM=dom1
    service LDOM=local_domain, RDOM=dom2
    service LDOM=local_domain, RDOM=dom3
    service LDOM=local_domain, RDOM=dom4
    As only the active domains will be used, and inactive ones will be skipped.
    Regards,
    Todd Little
    Oracle Tuxedo Chief Architect

  • Join  configuration cannot be resolved. Reason :more than 1 of the detail .

    Hi Guys,
    I am getting a following error while opening a discoverer report.
    Join  configuration cannot be resolved. Reason :more than 1 of the detail folders uses non-aggregated items .I know this error is regarding the fan trap.
    The report is built from 5 folders(Complex & Simple) and a custom folder.I have 3 more reports which are using some of the simple folders from these 5 folders and are joined with other folders with the appropriate joins.
    Is this the reason I am getting the error ?
    Appreciate your help !!
    Veejay

    Hi Veejay,
    is it that the columns which I am using should be at same levelNo, not really. A item that has a data point property means that Discoverer knows that the item can be aggregated in a report. So if you include detail (i.e. non-aggregated) data points into a workbook from 2 detail folders then Discoverer will generate a fan-trap error because the workbook is not aggregated correctly.
    Let me try and give you an example. Suppose we have 3 folders; A, B and C. Folders B and C are detail folders of A. Now support A has one row; folder B has 2 detail rows to A and folder C has 3 detail rows to A. Now if you create workbook selecting items from A and aggregate (e.g. SUM) items from B and C you will get 1 row containing the SUM from B and the SUM from C. Similarily, if you select the detail data point from B and the SUM from C you will get 2 rows containing rows from B and the SUM from C. However, if you select detail data points from both B and C you will get 6 rows in the report and Discoverer will generate a fan trap error because the number of rows do not relate to any one table. But, if you change the join from A to B to be a 1 to 1 join then you will still get 6 rows in the report, but Discoverer will not raise a fan trap error because Discoverer thinks the number of rows returned is in from table C because you have said that there is only 1 row in B for every row in A.
    Rod West

  • Error: You have more than one Creative players connected. - Recovery Tool for ZEN

    My Zen 4GB cannot be turned on anymore after a failed firmware upgrade (The installation hung up). I tried to run the firmware upgrade executable file again but the player must be on. So I tried to hardware reset by switching the power slide on while pressing the play button, but it still doesn't start. I downloaded and ran the Recovery Tool while the player was connected, but an error message appeared: "ERROR: You have more than one Creative players connected. Please remove all but one, click "OK" to exit and then run this program again." - There was no other players connected but the ZEN. Please help... What can I do

    I have this very exact same problem with the same model. Did you ever find a solution to this?

  • Rendering More than what in the Time line

    i just sent a seq to color and turned broadcast safe off before i did the corrections. This SEQ was sent via the send to color option.
    i only did i primary cc on the clip. Now i hit render and it seems to be rendering more than whats in the Color TL. In fact, i would say that it is rendering from shot marker to shot marker.
    SHOT MARK = when i first capture clip into fcp the first thing i do is mark all of the clip to know where certain action is. Some time i set the in/outs and pull the shots to a bin for latter use.

    As Zeb is referring to, Hmmm... this is the first time (today) that I have seen a query about this extremely well known and exhaustively documented behaviour.
    There are about a half a dozen of these, that catch out users of the product in its current form who make a dangerous set of assumptions about how media is treated between the editing software and the grading application. COLOR is not the only offender in this category, though -- there are serious problems associated with speed-remapped clips in many external VFX packages.
    Among AVID users, time remaps are one of the biggest complaints about the Final Cut workflow, notwithstanding FC's "goldfish memory" when it comes to media paths and file names.
    jPo

  • ADF Faces Skins: Way to refer to more than one alias in a selector?

    Is there any way to refer to more than one alias at a time in a selector? The obvious one,
    .SpotlightStyles
      -ora-rule-ref:selector(".AFVeryLargeFont:alias");
      -ora-rule-ref:selector(".AFMediumForeground:alias");
    }doesn't seem to work...it looks like only the last mentioned rule gets used.
    Thanks much,
    Avrom

    Hi,
    well not quite sure about your issue. But normally additional key fields for a characteristic are maintained doing a compounding of the characteristic to at least one other characteristic. You can do that in the infoobject maintenance on the tab compounding.
    regards
    Siggi

  • If possible, one SoftReference refer to more than one object?

    Hello,
    I want design a cache to keep huge number objects.
    If create a new SoftReference intance for each object,
    will take a lot of space and time.
    So, one SoftReference refer to more than one object, if possible?

    or arrange your objects into buckets somehow and have
    soft references to the bucketsEn, It's a good idea. but I think it doesn't work.
    My problem is:
    There are many caches(cache1, cache2.......), they may cache a lot of same object instance.
    then, I want to keep a object pool, and try to get the equal object from pool before put a object into a cache, if there is an equal object, put the equal object into cache, if there is no equal object, put the target object into pool and cache. the object pool may very huge because there is lot of objects. So it's necessary to release the object in the pool if no cache referes to the object(the caches contain the object may removed). Then SoftReference come into my mind. I try to create a SoftReference for each object in the pool, but soonly, I find there are two problems:
    1, A lot SoftReference instances take much memory.
    2, Need some time to new and reclaim the SoftReference intances.
    I think SoftReference may work fine to cache the object frequently used,
    but the object number can't be too large.
    Now, I don't use object pool. replace starting a thread to scan those cache s and combine the same objects intervally. It can scan about 2000,000 objects one second in my pc. It's ok for my project. But I am looking for some better way still.

  • More than one add-on

    In 2004A, was anybody able to run more than one add-on at a time without setting each add-on identifier?
    Do we have to pay to get a development license key name for each add-ons we develop?
    Thanks
    Regards

    Hi Enrico,
    Yes we can run multiple add-ons at a time, without setting the add-on identifier. These add-ons will run until December 31 2005, after this date the add-ons must have an add-on identifier to run, this is stated in one of the SDK help files.
    Regards, Lita

  • I am using a Photoshop cs2, and I wonder if it is possible to keep the settings of the guidelines when closing an image, with the actual document ? It would be nice to have the guidelines locked down, I find it than when opening the same or another image,

    I am using a Photoshop cs2, and I wonder if it is possible to keep the settings of the guidelines when closing an image, with the actual document ? It would be nice to have the guidelines locked down, I find it than when opening the same or another image, the guidelines are not locked, it is annoying to have to lock them down again. and it would actually be nice, to ba able to give specific directions when placing the guidelines. Thanks

    Then why are the guides unlocked when I reopen a document that I saved with the guides locked ?
    Thanks.

Maybe you are looking for

  • InvalidSecurity Exception in WS and SOAP with Attachment

    Hi all, <bR> <br> I created a EJB based webservice with the following signature:      <br><br> public String businessMethod2(byte[] arg1) {..}<br> <br> <br> This Method is exposed as webservice, which is configured as SOAP with Attachment. <br> All s

  • New Field in AR03 t-code output.

    Hello Experts. I am working on AR03 T-Code, and i want to add a new customer field into the existing output. Could you help me out that by the help of which user exist i can put a new field. Thank you....

  • Height of the richtexteditor dialog

    Can we set the height of the richtext editor dialog? Is it possible to show more than 8 lines in the Rich Text component? When formatting multiple lines of text, it is easier to have more lines visible in the component dialog, having more room to wor

  • Ios7 how to delete bookmarks?

    My bookmarks are still there after the download which I definitely wish I had not done!  There appear to be no way of deleting unwanted bookmarks. I have even looked in ios7 manual and there is nothing about deleting them only adding them?

  • How do I file email into folders?

    Hi, How do I create and file emails into folders? I've created a "Smart Mailbox" (whatever that is, lol) and tried to drag emails into that folder but it doesn't work. When I click on the email and want to move it, nothing shows up to move it to: inc