Strict self-refer​ence for a reentrant vi
OK, I have the following scenario.
I have a background process which takes a reference of a buffer VI and auto-updates the data. To do this I need to pass it a strct VI reference so that it can call the VIs associated with the references.
Up until now we've maintained several buffer VIs for several instances but I wanted to make a single re-entrant VI work and thus eliminate this overhead but I ran into a small problem.
I need to get a strict reference to my reentrant clone. I can't go via "Open VI Reference" because this allocates a new clone and I can't cast a simple VI reference to the required strict type via "cast to more specific class".
How do I go about this?
I'm using LV 2011 SP1.
Shane.
Say hello to my little friend.
RFC 2323 FHE-Compliant
Type cast doesn't work. I cannot wire a strict reference to the middle terminal of the type cast function. unusually enough, flattening to string and back to strict type doesn't give a broken wire, but also doesn't work.
Using the clone name to open a reference doesn't work either. At least it dodn't for me. I was hoping that would work, but apparently not.
I have used a workaround where i open a reentrant strict typed reference (Open VI reference) and then pass this reference to the various places I want to access the buffer. Seems not ideal, but it works fine.
Regarding use case: I'm making changes to existing code and ti utilises a backgground process which registers strict vi references to call them whenever new data is ready. It's not how I would ideally implement the code myself but as I said, it's making modifications to existing code so I can't just throw the rest overboard.....
Shane.
Say hello to my little friend.
RFC 2323 FHE-Compliant
Similar Messages
-
How can I create a form in FormsCentral be a self-correcting quiz for my students?
How can I create a form in FormsCentral be a self-correcting quiz for my students?
Hi;
You can't make it self correcting.
The only related idea I have is you could publish the Response Table (the "View Response" tab). You could add an entry for the "right" answers so after a student completes the form the re-direct URL could take them to the Response Table where they could see their entry along with the right answers that you had added.
They could not edit their response to correct it unless they have a FormsCentral account (free is fine) and you share the form with them, otherwise they can still view the link to see how they did (but would also see all of the other students answers).
If this sounds interesting I can give more detail on how to set it up.
Thanks,
Josh -
Possible to select self-signed certificate for client validation when connecting to VPN with EAP-TLS
In windows 8.2, I have a VPN connection configured with PPTP as the outer protocol and EAP : "Smart card or other certificate ..." as the inner protocol. Under properties, in the "When connecting" section I've selected "Use a certificate
on this computer" and un-checked "Use simple certificate selection".
My preference would be to use separate self-signed certificates for all clients rather than having a common root certificate that signed all of the individual client certificates. I've tried creating the self-signed certificate both with and without the
client authentication EKU specified, and I've added the certificate to the trusted root certificate authority store on the client. But when I attempt to connect to the VPN I can not get the self signed certificate to appear on the "Choose a certificate"
drop down.
Are self signed certificates supported for this use in EAP-TLS? If it makes a difference, I'm working with makecert (not working with a certificate server).
TIA,
-RickHi Rick,
Thank you for your patience.
According to your description, would you please let me know what command you were using to make a self-signed certificate by tool makecert? I would like to try to reproduce this issue. Also based on my experience, please let me
know if the certificate has private key associated and be present in the local machine store. Hence, please move the certificate from the trusted root certificate authority store to personal store.
Best regards,
Steven Song
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. -
Table creation Error "Ref Count for this object is higher than 0"
Hi All
I have a problem in creation of table using SDK on a button event. I have a procedure to create tables and fields. If I call this procedure on a menu Event than it works fine but If I call this procedure on a button event than It gives error "Ref count for this object is higher than 0" . I know this error occur When an object does not release after creating a table. but this error occur at when first table is created. My code it given below. plz see and give me your valuable suggestions.
Dim oUserTablesMD As SAPbobsCOM.UserTablesMD
Try
oUserTablesMD = B1Connections.diCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserTables)
oUserTablesMD.TableName = "AM_OBIN"
oUserTablesMD.TableDescription = "PutAway Table"
oUserTablesMD.TableType = BoUTBTableType.bott_Document
lRetCode = oUserTablesMD.Add
'// check for errors in the process
If lRetCode <> 0 Then
B1Connections.diCompany.GetLastError(lRetCode, sErrMsg)
MsgBox(sErrMsg)
Else
B1Connections.theAppl.StatusBar.SetText("Table: " & oUserTablesMD.TableName & " was added successfully", BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Success)
End If
System.Runtime.InteropServices.Marshal.ReleaseComObject(oUserTablesMD)
oUserTablesMD = Nothing
GC.Collect()
oUserTablesMD = B1Connections.diCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserTables)
oUserTablesMD.TableName = "AM_BIN1"
oUserTablesMD.TableDescription = "PutAway Upper Grid"
oUserTablesMD.TableType = BoUTBTableType.bott_DocumentLines
lRetCode = oUserTablesMD.Add
'// check for errors in the process
If lRetCode <> 0 Then
If lRetCode = -1 Then
Else
B1Connections.diCompany.GetLastError(lRetCode, sErrMsg)
MsgBox(sErrMsg)
End If
Else
B1Connections.theAppl.StatusBar.SetText("Table: " & oUserTablesMD.TableName & " was added successfully", BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Success)
End If
System.Runtime.InteropServices.Marshal.ReleaseComObject(oUserTablesMD)
oUserTablesMD = Nothing
GC.Collect()
Catch ex As Exception
MsgBox(ex.Message)
End Try
Thanks
Regards
GorgeHi Gorge,
The "Ref count error..." usually occurs in case of Meta Data objects not being properly cleared. And yes, you have got the error in the right place, generally while creating tables / fields / UDOs. For this, you just need to clear the Meta Data object (At times even DI objects like Record Set) once they are used.
Eg: Release these objects in the below way in a Finally Block.
System.Runtime.InteropServices.Marshal.ReleaseComObject(oRecordSet);
Hope this helps.
Regards,
Satish -
SCCM 2012 has been successfully installed on the server:
SRVSCCM.
The database is on SQL Server 2008 R2 SP1 CU6 Failover Cluster (CLS-SQL4\MSSQLSERVER04)
Cluster nodes: SQL01 and SQL01. On all nodes made necessary the Security Setup of SCCM. No errors and warning on SCCM Monitoring.
The cluster service is running on the account: sqlclusteruser
The account has the appropriate SPN are registered:
setspn -L domain\sqlclusteruser
Registered ServicePrincipalNames for CN=SQL Cluster,OU=SQL,OU=Users special,OU=MAIN,DC=domain,DC=local:
MSSQLSvc/CLS-SQL4
MSSQLSvc/CLS-SQL4.domain.local
MSSQLSvc/CLS-SQL4:11434
MSSQLSvc/CLS-SQL4.domain.local:11434
After some time on the cluster hosts every day started appearing new folders with files inside:
srvboot.exe
srvboot.ini
srvboot.log
srvboot.log contains the following information:
SMS_SERVER_BOOTSTRAP_SRVSCCM.domain.local_SMS_SQL_SERVER started.
Microsoft System Center 2012 Configuration Manager v5.00 (Build 7711)
Copyright (C) 2011 Microsoft Corp.
Command line: "SMS_SERVER_BOOTSTRAP_SRVSCCM.domain.local_SMS_SQL_SERVER CAS K:\SMS_SRVSCCM.domain.local_SMS_SQL_SERVER8 /importcertificate SOFTWARE\MicrosoftCertBootStrap\ SMS_SQL_SERVER".
Set current directory to K:\SMS_SRVSCCM.domain.local_SMS_SQL_SERVER8.
Site server: SRVSCCM.domain.local_SMS_SQL_SERVER.
Importing machine self-signed certificate for site role [SMS_SQL_SERVER] on Server [SQL01]...
Failed to retrieve SQL Server service account.
Bootstrap operation failed: Failed to create machine self-signed certificate for site role [SMS_SQL_SERVER].
Disconnecting from Site Server.
SMS_SERVER_BOOTSTRAP_SRVSCCM.domain.local_SMS_SQL_SERVER stopped.The site server is trying to install the sms_backup agent on the SQL Server Cluster nodes.
Without successfull bootstrap the siteserver backup is not able to run successfully.
Try grant everyone the read permisson on
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SMS on the SQL server nodes.
This worked for me.
After that a Folder named "SMS_<SITESERVER-FQDN>" appeared on C: on the SQL Cluster nodes, and a "SMS_SITE_SQL_BACKUP_FQDN" Service should be installed.
After the new Folder is created and the new Service is installed, you can safely remove the bootstrap Service by opening a command prompt and enter:
sc delete "SMS_SERVER_BOOTSTRAP_FQDN-of-SiteServer_SMS_SQL_SERVER" -
Ref count for this object is higher then 0
Hi Friends,
I am facing problem of "Ref count for this object is higher then 0" when creating User define table / fields and at the time ot registration of object also. In my addon there almost 4-5 customized screens for which I have to create object. So I use SDK to create object
While creating object it creates 1st 4 fields then it shows error if I start it again then it create next 4 fields and show error in next 5th field.
I am using this code after creating udf
//For checking fields for already created and destroy the object by using this snippet
If System.Runtime.InteropServices.Marshal.IsComObject(rsRecordset) Then
System.Runtime.InteropServices.Marshal.ReleaseComObject(rsRecordset)
rsRecordset = Nothing
GC.Collect()
End If
if not exist then I create it and release the object by using this snippet
If Marshal.IsComObject(octfield) Then
System.Runtime.InteropServices.Marshal.ReleaseComObject(octfield)
octfield = Nothing
GC.Collect()
End If
//After creating fields I create registration and release object by using this snippet
If Marshal.IsComObject(udr) Then
Marshal.ReleaseComObject(udr)
udr = Nothing
GC.Collect()
End If
Thanks In AdvanceHello
Solution is very easy, and safe by the following methods. If you search the threads, you may find similar answers.
Step 1. Create each User Defined tables. When you have created one table, you can reconnect the DI API!
Step 2. Create UDFs-, and do not check whether is exists or not. You may check the Return value of add method, if you receive the field is already exists, you go to the next step
Step 3. Register objects
Here are examples
Private Function AddUDT(ByVal tablename As String, ByVal description As String, ByVal tabletype As SAPbobsCOM.BoUTBTableType) As Boolean
Dim oUDT As UserTablesMD
oUDT = oCompany.GetBusinessObject(BoObjectTypes.oUserTables)
Try
If oUDT.GetByKey(tablename) Then
Return False
End If
oUDT.TableName = tablename
oUDT.TableDescription = description
oUDT.TableType = tabletype
Dim lretcode As Integer = oUDT.Add()
If (lretcode <> 0) Then
If (lretcode = -2035) Then
Return False
End If
SBO_Application.StatusBar.SetText(String.Format("{0}-{1}", oCompany.GetLastErrorCode(), oCompany.GetLastErrorDescription()), BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Error)
Return False
End If
oCompany.Disconnect()
GC.Collect()
Dim sCookie As String = oCompany.GetContextCookie
Dim sConnectionContext As String
sConnectionContext = SBO_Application.Company.GetConnectionContext(sCookie)
oCompany.SetSboLoginContext(sConnectionContext)
If oCompany.Connect() <> 0 Then
SBO_Application.StatusBar.SetText(String.Format("{Reconnecting error:{0}-{1}", oCompany.GetLastErrorCode, oCompany.GetLastErrorDescription))
End
End If
Return True
Catch ex As Exception
SBO_Application.StatusBar.SetText(String.Format("{0}-{1}", "AddUDT", ex.Message), BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Error)
Return False
Finally
GC.Collect()
End Try
End Function
Private Function AddUDF(ByVal tablename As String, ByVal fieldname As String, ByVal fielddesc As String, ByVal fieldtype As BoFieldTypes, ByVal fieldsize As Integer, ByVal fieldvalues As String, ByVal defaultvalue As String, Optional ByVal LinkedTable As String = "") As Boolean
Dim oUDF As UserFieldsMD
oUDF = oCompany.GetBusinessObject(BoObjectTypes.oUserFields)
Try
oUDF.Name = fieldname
oUDF.Type = fieldtype
'oUDF.SubType = BoFldSubTypes.st_Quantity
oUDF.Size = fieldsize
oUDF.Description = fielddesc
oUDF.TableName = tablename
oUDF.EditSize = fieldsize
If (fieldvalues.Length > 0) Then
For Each s1 As String In fieldvalues.Split("|")
If (s1.Length > 0) Then
Dim s2 As Array = s1.Split("-")
oUDF.ValidValues.Description = s2(1)
oUDF.ValidValues.Value = s2(0)
oUDF.ValidValues.Add()
End If
oUDF.DefaultValue = defaultvalue
Next
End If
If LinkedTable <> "" Then
oUDF.LinkedTable = LinkedTable
End If
Dim lretcode As Integer = oUDF.Add()
If (lretcode <> 0) Then
If (lretcode = -2035 Or lretcode = -1120) Then
Return False
End If
SBO_Application.StatusBar.SetText(String.Format("{0}-{1}", oCompany.GetLastErrorCode(), oCompany.GetLastErrorDescription()), BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Error)
Return False
End If
Return True
Catch ex As Exception
SBO_Application.StatusBar.SetText(String.Format("{0}-{1}", "AddUDF", ex.Message), BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Error)
Return False
Finally
GC.Collect()
oUDF = Nothing
End Try
End Function
calling them
bUserFieldAdded = AddUDT("IHBTRANSLATION", "Translation/Fordítás", BoUTBTableType.bott_Document)
bUserFieldAdded = bUserFieldAdded Or AddUDF("IHBTRANSLATION", "IHBTEXT", "Text/Szöveg", BoFieldTypes.db_Alpha, 254, "", "") -
Self service api for 11.1.2 B2B???
Hi All,
I have installed 11.1.2 Soa suite and B2B comes along with it.. I wanted the pointer to documentation that explains about using the self-service APIs for tp and agreement creation....
Regards,
PraveenHi Nitesh..
I was successfull in creating the TP by using the following xml..
<SelfService xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="selfservice.xsd"
xmlns="http://xmlns.oracle.com/integration/b2b/selfservice/profile">
<DocumentProtocols>
<DocumentProtocol name="EDI_EDIFACT">
<DocumentProtocolVersion name="D98A">
<DocumentType name="ORDERS">
<DocumentDefinition name="ORDERS_DEF" useDefaultDefinition="true" definitionFileName="po_oag.xsd">
</DocumentDefinition>
</DocumentType>
</DocumentProtocolVersion>
</DocumentProtocol>
</DocumentProtocols>
<TradingPartners>
<TradingPartner name="GlobalChips7" hosted="false">
<Identification name="Name"/>
<DeliveryChannel ackMode="None" compressed="false" internal="false" listening="false" name="GlobalChips7_AS2_Channel" responseMode="None">
<ExchangeProtocolRef name="AS2" />
<TransportProtocolRef name="HTTP">
<ParameterValue name="url" value="http://hostname:1111/HTTPService/Receiver" />
<ParameterValue name="user" value="xxxx" />
<ParameterValue name="password" value="welcome" />
</TransportProtocolRef>
<DigitalSecurity ackSigned="false" messageEncrypted="false" messageSigned="false" transportSecured="false" />
</DeliveryChannel>
<SupportedDocumentDefinition initiator="true" docTypeName="ORDERS" docProtocolVersion="D98A" docProtocolName="EDI_EDIFACT" docDefName="ORDERS_DEF"/>
<SupportedDocumentDefinition initiator="false" docTypeName="ORDERS" docProtocolVersion="D98A" docProtocolName="EDI_EDIFACT" docDefName="ORDERS_DEF"/>
</TradingPartner>
</TradingPartners>
</SelfService>
I have already created the EDI_EDIFACT document Defn in the UI and I ran the ant script with overwrite=false when loading the metadata and TP got created successfully and I am able to see that values correctly in the UI...
The problem is when I use the agreements in the xml..... I used the following xml.
<?xml version="1.0" encoding="UTF-8" ?>
<SelfService xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="selfservice.xsd"
xmlns="http://xmlns.oracle.com/integration/b2b/selfservice/profile">
<DocumentProtocols>
<DocumentProtocol name="EDI_EDIFACT">
<DocumentProtocolVersion name="D98A">
<DocumentType name="ORDERS">
<DocumentDefinition name="ORDERS_DEF" useDefaultDefinition="true" definitionFileName="po_oag.xsd">
</DocumentDefinition>
</DocumentType>
</DocumentProtocolVersion>
</DocumentProtocol>
</DocumentProtocols>
<TradingPartners>
<TradingPartner name="GlobalChips7" hosted="false">
<Identification name="Name"/>
<DeliveryChannel ackMode="None" compressed="false" internal="false" listening="false" name="GlobalChips7_AS2_Channel" responseMode="None">
<ExchangeProtocolRef name="AS2" />
<TransportProtocolRef name="HTTP">
<ParameterValue name="url" value="http://hostname:1119/HTTPService/Receiver" />
<ParameterValue name="user" value="XXXX" />
<ParameterValue name="password" value="welcome" />
</TransportProtocolRef>
<DigitalSecurity ackSigned="false" messageEncrypted="false" messageSigned="false" transportSecured="false" />
</DeliveryChannel>
<SupportedDocumentDefinition initiator="true" docTypeName="ORDERS" docProtocolVersion="D98A" docProtocolName="EDI_EDIFACT" docDefName="ORDERS_DEF"/>
<SupportedDocumentDefinition initiator="false" docTypeName="ORDERS" docProtocolVersion="D98A" docProtocolName="EDI_EDIFACT" docDefName="ORDERS_DEF"/>
</TradingPartner>
</TradingPartners>
<Agreements>
<Agreement agreementId="Acme_Global_EDIFACT_D98A_ORDERS_AS2" name="Acme_Global_D98A_ORDERS_AS2">
<SupportedDocumentType docDefName="ORDERS_DEF" docProtocolName="EDI_EDIFACT" docProtocolVersion="D98A" docTypeName="ORDERS">
<InitiatingParticipant name="Acme" >
<Identifications>
<IdentificationRef name="Name"/>
</Identifications>
</InitiatingParticipant>
<RespondingParticipant name="GlobalChips7" >
<Identifications>
<IdentificationRef name="Name"/>
</Identifications>
<DeliveryChannels>
<DeliveryChannelRef name="GlobalChips7_AS2_Channel" />
</DeliveryChannels>
</RespondingParticipant>
<AgrDocTypeParameterValues>
<ParameterValue name="validate" value="true" />
</AgrDocTypeParameterValues>
</SupportedDocumentType>
</Agreement>
<Agreement agreementId="GlobalChips7_Acme_EDIFACT_D98A_ORDERS_AS2" name="GlobalChips7_Acme_EDIFACT_D98A_ORDERS_AS2">
<SupportedDocumentType docDefName="ORDERS_DEF" docProtocolName="EDI_EDIFACT" docProtocolVersion="D98A" docTypeName="ORDERS">
<InitiatingParticipant name="GlobalChips7" >
<Identifications>
<IdentificationRef name="Name"/>
</Identifications>
</InitiatingParticipant>
<RespondingParticipant name="Acme" >
<Identifications>
<IdentificationRef name="Name"/>
</Identifications>
</RespondingParticipant>
<AgrDocTypeParameterValues>
<ParameterValue name="validate" value="true" />
</AgrDocTypeParameterValues>
</SupportedDocumentType>
</Agreement>
</Agreements>
</SelfService>
The soa.zip got created successfully. But during the metadata load, it was giving the following exception.
[java] Import with overwrite=false
[java] B2BCommandLineUtility: importRepository: Error messages:
[java] MDS-02202: Content of the metadata object "/soa/b2b/tpa_id158BB91123862.xml" is not valid.
[java] MDS-02201: type validation failure for the metadata object "/soa/b2b/tpa_id158BB91123862.xml"
[java] MDS-02203: type validation error for the metadata object "/soa/b2b/tpa_id158BB91123862.xml" at the node "id178BB91381874"
[java] Required attribute tradingPartnerRef missing from element InitiatingParticipant
[java] MDS-02203: type validation error for the metadata object "/soa/b2b/tpa_id158BB91123862.xml" at the node "id178BB91381874"
[java] Required attribute supportedDocumentDefinitionRef missing from element InitiatingParticipant
[java] MDS-02203: type validation error for the metadata object "/soa/b2b/tpa_id158BB91123862.xml" at the node "id188BB91635040"
[java] Required attribute identificationRef missing from element IdentificationRef
Can you please help me..
Regards,
Praveen -
How to solve the error "Ref Count for this object is greater then 0"
Hi,
I'm trying to add UDF at runtime to an already created UDT which is of No Object Type.
my code is as follows:
dim oUserFieldsMD As SAPbobsCOM.UserFieldsMD
oUserFieldsMD = ocompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserFields)
oUserFieldsMD.TableName = "@TI_ADDCODES"
oUserFieldsMD.Name = codetoinsert
oUserFieldsMD.Description = desctoinsert
'Add the field to the table
lRetCode = oUserFieldsMD.Add
If lRetCode <> 0 Then
ocompany.GetLastError(lErrCode, sErrMsg)
MsgBox(sErrMsg)
Else
MsgBox("Field: '" & oUserFieldsMD.Name & "' was added successfuly to " & oUserFieldsMD.TableName & " Table")
End If
I got error msg as "Ref Count for this object is greater then 0" and error code is -1120
how to rectify it?
Thanks in advance!!!Hi,
Have you searched the forum? You may check this first: error -1120 when adding UserTableMD.
Thanks,
Gordon -
A bug! -1120 Ref count for this object is higher then 0
Hello experts!
the following code makes an error -1120 Ref count for this object is higher then 0
but the next code doesn't ...
who is attentively enough, can find the difference. (is commened out)
please fix the bug.
static class Program
static void Main()
SAPbouiCOM.SboGuiApi SboGuiApi;
string sConnectionString = "0030002C0030002C00530041005000420044005F00440061007400650076002C0050004C006F006D0056004900490056";
SboGuiApi = new SAPbouiCOM.SboGuiApi();
SboGuiApi.Connect(sConnectionString);
SAPbouiCOM.Application app = SboGuiApi.GetApplication(-1);
SAPbobsCOM.Company comp = app.Company.GetDICompany() as SAPbobsCOM.Company;
rs = comp.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset) as SAPbobsCOM.Recordset;
SAPbobsCOM.UserTablesMD userTable = comp.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserTables) as SAPbobsCOM.UserTablesMD;
userTable.TableName = "MSB_SL";
userTable.TableDescription = "TableName";
userTable.TableType = SAPbobsCOM.BoUTBTableType.bott_MasterData;
int i = userTable.Add();
Application.Run();
static class Program
static void Main()
SAPbouiCOM.SboGuiApi SboGuiApi;
string sConnectionString = "0030002C0030002C00530041005000420044005F00440061007400650076002C0050004C006F006D0056004900490056";
SboGuiApi = new SAPbouiCOM.SboGuiApi();
SboGuiApi.Connect(sConnectionString);
SAPbouiCOM.Application app = SboGuiApi.GetApplication(-1);
SAPbobsCOM.Company comp = app.Company.GetDICompany() as SAPbobsCOM.Company;
// // // rs = comp.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset) as SAPbobsCOM.Recordset;
SAPbobsCOM.UserTablesMD userTable = comp.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserTables) as SAPbobsCOM.UserTablesMD;
userTable.TableName = "MSB_SL";
userTable.TableDescription = "TableName";
userTable.TableType = SAPbobsCOM.BoUTBTableType.bott_MasterData;
int i = userTable.Add();
Application.Run();
Best Regards,
Alexander FriesenHello
Remove the following line:
rs = comp.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset) as SAPbobsCOM.Recordset;
You have created the rs object from ocompany. You would like to execute a query maybe over a table which will be added later on (in your code in the next lines), so who would handle this?
Remember, the SAP B1 Gui is reconnects (re-reads) when you creating an UDF/UDT/UDO on a database where multiple users logged in.
Not a bug, 2007 version working like this:
So always the 1st step is the creation of Tables
If a table has been created, you must reconnect the DI API !
Then, every other operation, declaration, object values could come.
Older versions of SAP B1 was working in a different way: way enabling the creation of UDT/UDO/UDFs in One rutin. I was caused a lot's of problems.
Regards
J.
Edited by: János Nagy on Jun 1, 2010 4:26 PM -
Ref count for this object is higher than 0
Hi All,
I have a critical issue in my ARD.
When i start the Addon iam getting an error like this and the Addon will get disconnected
"Ref count for this object is higher than 0"
Can anyone suggest me some ideas to resolve this issue,I have been trying from last 1 week.
Thanks,
Shangai.Hi Gordon,
Before posting the error first i have searched the same in the forum , as they said i have used the garbage collector like the below one but still the error exists.
oRecordset = (SAPbobsCOM.Recordset)oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset);
try
oRecordset.DoQuery("SELECT ...I am checking if the table exist...");
catch
return true; // The Table do not exist...
finally
System.Runtime.InteropServices.Marshal.ReleaseComObject(oRecordset);
oRecordset = null;
GC.Collect();
Thanks,
shangai. -
Question about IDS Self Study Guide for IDS
Hello,
i'm searching for a self study guide for the ips (ASA-SSM-10/20) where i can see how to configure signatures and deployment.
Thanks in advance for your help
regards
KlausThe signature configuration for the SSM module is identical to any of the other IPS sensors. The root of all IPS documentation is here:
http://cisco.com/en/US/products/hw/vpndevc/ps4077/tsd_products_support_series_home.html
Here is the ASA 7.1 doc on how to move traffic to the SSM
http://cisco.com/en/US/docs/security/asa/asa71/configuration/guide/ssm.html -
Error: Ref count for this object is higher then 0
Hello All,
I am trying to create User Defined Tables in SAP through Coding but while running the code the error "Ref count for this object is higher then 0 " is showing .
I have created a temporary table in which the Table Description are stored as follows :-
Create Table Test_Table (TblCode Varchar(30),TblName Varchar(100),TblType int)
From this table then using recordset i am getting the table details for creation :-
oRecord.DoQuery("Select TblCode,TblName,TblType From Csv_UDT")
While Not oRecord.EoF
Dim Table_Id As String = oRecord.Fields.Item("TblCode").Value
Dim Table_Name As String = oRecord.Fields.Item("TblName").Value
Dim Table_Type As integer = oRecord.Fields.Item("TblType").Value
Dim oUserTablesMD As SAPbobsCOM.UserTablesMD
oUserTablesMD = Class_OprTbl_Main.ocompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserTables)
'// set the table parameters
oUserTablesMD.TableName = Table_Id
oUserTablesMD.TableDescription = Table_Name
oUserTablesMD.TableType = Table_Type
lRetCode = oUserTablesMD.Add
If lRetCode <> 0 Then
If lRetCode = -1 Then
Else
Class_OprTbl_Main.ocompany.GetLastError(lRetCode, sErrMsg)
Class_OprTbl_Main.SBO_Application.MessageBox(sErrMsg + oUserTablesMD.TableName)
End If
End If
System.Runtime.InteropServices.Marshal.ReleaseComObject(oUserTablesMD)
oUserTablesMD = Nothing
But while running this code the error is coming .
How to solve this error ........
Thanks,
AmitFirst of all, you are not meant to create temporary table in SAP database. SAP have never made an official announcement, but I think they would not be too happy if they saw it and may withdraw support. Just something to be aware of.
Secondly, your error is very common and you would have found the solution by searching the forum. It is caused by having an open recordset while trying to use a metadata object.
You will have to change how your code works. You can not use the UserFieldsMD or UserTablesMD object while you have an undisposed recordset object.
-1120 - Ref count for this object is higher then 0
Ref count for this object is higher then 0
Error: Ref count for this object is higher then 0
Meaning of Error Msg: "Ref count for this object is higher than 0"
The solution is you must dispose of any recordset object before attempting to use the UserTablesMD object:
System.Runtime.InteropServices.Marshal.ReleaseComObject(oRecordSet)
oRecordSet= Nothing
GC.Collect()
GC.WaitForPendingFinalizers() -
-1120 - Ref count for this object is higher then 0
-1120 - Ref count for this object is higher then 0
I get this error when adding an object from XML, however if I run the exact same code again on the application it works?
Anyone experienced anything like this?Hi Daniel,
This error normaly occurs when using metadata objects. (When adding tables and fields and UDO's). SBO only allows 1 connection to such an object. I don't know what you are attempting to do, but it's always "wise" to kill objects that you are finished with before instanciating new ones (saves on memory etc.). Thus I will show you what I do and maybe if you are more specific in creation and killing of objects your problem will be solved. My demo is in VB .Net.
'1. Add a table using SAPbobsCOM.UserTablesMD object
Dim oUTables As SAPbobsCOM.UserTablesMD
'Create Instance of UserTablesMD object
oUTables = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserTables)
'Add the table code .....................
'NOW to KILL the object
' IMPORTANT: Only one (handle to a) user table or field object should be alive
' at one time!!! -> In .NET call this first
System.Runtime.InteropServices.Marshal.ReleaseComObject(oUTables)
'Then set object variable to Nothing
oUTables = Nothing
GC.Collect() 'Call the garbage collector for good measure
'2. Add a field using SAPbobsCOM.UserFieldsMD object
Dim oUFields As SAPbobsCOM.UserFieldsMD
'Create Instance of UserFieldsMD object
oUFields = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserFields)
'Add the field code .....................
'NOW to KILL the object
' IMPORTANT: Only one (handle to a) user table or field object should be alive
' at one time!!! -> In .NET call this first
System.Runtime.InteropServices.Marshal.ReleaseComObject(oUFields)
'Then set object variable to Nothing
oUFields = Nothing
GC.Collect()
TRY THIS - MAYBE IT WORKS FOR YOU... -
Mass creation of Oracle HR Self Service Users (for access to all employees)
Mass creation of Oracle HR Self Service Users (for access to all employees)
Hi all,
We have Oracle Human Resources 11.5.7 and recently implement Oracle HRMS (Self Service) for the purpose of Online Appraisal System.
Is there any fast way to create all employees as users of the Self Service instead of creating the users manually one by one in HR?
I would appreciate any feedback.
Thanking you in advance.
Best regards,
Elena Demetriou
Hellenic BankCheck pages 2-23 and following of the Deploying SSHR Capability V5.2 guide on Metalink. It describes the methods for Batch Creation of User Accounts.
-
Self Signed Certificate for Web Proxy 4.0.2
Does anyone have instructions on how to create and install self signed Certificate for Web Proxy Server 4.0.2? My OS is RHEL 4.
Shed.Unfortunately you will not be able to do that from the GUI.
You will have to use certutil frin proxy-install/bin/proxy/admin/bin/certutil
Make sure that your LD_LIBRARY_PATH includes proxy-install/bin/proxy/lib
(start -shell will give you a shell with all necessary paths set.)
create a file called password-file which contains your password to your cert database
your cert database resides in the alias directory of proxy installation.
certutil -S -s "CN=My Issuer" -n myissuer -x -t "C,C,C" -1 -2 -5 -m 1234
-f password-file -d certdir
Maybe you are looking for
-
DVD CD RW Drive Malfunctio​n. Can anyone pleas help solve this?
THE PROBLEM: DVD CD RW Disc drive malfunction. I strongly suspect device failure, but could it be a software issue? The drive appears to be working as evidenced by the usual clicking and whirring sounds. Then, as I usually do, from the START MENU,
-
Hello, I have multiple PDF's open in Mac Preview, and I need to shut down my computer. Is there any way for Preview to re-open all of the files I was previously looking at when I turn my computer back on? I can see the "Open Recent" option under the
-
Cant delete or add item to Jlist as nthing happens
Hi all, regarding the first part where pass of string array into object array. I have done it (thanks again for the help). But regarding the add and remove elements from the Jlist cant be done.. below is my code for the delete button when press. I ca
-
ICal reminders don't work when Mac is off
iCal does not send email reminders if the Mac is turned off which is obviously not very useful. I cannot ensure that my Macbook is on+connected to the internet each time a reminder needs to be sent. For instance, I might be at work and still want to
-
I just updated my snow leopard mac with updates including garageband, iphoto, safari, hp printer, itunes and java. After that Firefox 3.6.17, which had been working fine, crashed after I would open many pages including myebay and igoogle. I tried saf