Jump to content

OlmanQuesada

Mobilize.Net Staff
  • Content Count

    38
  • Joined

  • Last visited

  • Days Won

    1

OlmanQuesada last won the day on March 23

OlmanQuesada had the most liked content!

Community Reputation

2 Neutral

About OlmanQuesada

  1. Hi Romeo, If during the download process you were not prompt to register please go to the following form https://www.mobilize.net/vbuc-free-trial and then either use the download button with the email you will receive or use the file you’ll get in the email after filling-out the form. Please let me know if this works. Regards, OlmanQ
  2. OlmanQuesada

    Problem with upgrade

    Hi Astrid, In regards with the first error in Windows 7, please follow the next steps: [Workarround Steps] 1. Open a Windows command prompt with administrator privileges 2. Go the Mobilize.Net VBUC folder, where the binary files are located. It is very possible this folder is: “C:\Program Files (x86)\Mobilize.Net Visual Basic Upgrade Companion\” 3. Execute the following commands: Vbu.exe /regserver C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe ArtinSoft.VisualBasic.UpgradeExtensions.dll C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe VBUpgrade.Engine.dll C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe VBUpgrade.Utils.dll C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe ResxManager.dll C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe VBUpgrade.OcxStateGenerator.dll I'd like to review with you the Dot Net class issue. Would you be available for a remote session at this moment? If so, this is the zoom URL https://mobilize.zoom.us/j/383181282 Otherwise, we can coordinate a session for Tuesday next week just let me now your availability. Regards, OlmanQ
  3. OlmanQuesada

    Problem with upgrade

    Hello Astrid, Are you migrating the code using Windows 10 or any other windows version? Please send us an screenshots of the Solution and Resolve Reference section of the VBUC. The issue may be caused because there's a missing reference in the VB6 code (DLL with CLSID 11C67C12-105A-4F42-A5C8-CB9070F2855A). Thanks, Olman Q
  4. OlmanQuesada

    Trial version

    Hello Arnaud, The email with the license was empty without any attached file?
  5. OlmanQuesada

    rs.Properties("Unique Table")

    You should recreate a new update from scratch that reflects the changes in that table. Please take a look at this URL https://stackoverflow.com/questions/34623292/how-to-update-a-table-using-join-in-visual-studio
  6. OlmanQuesada

    References msdatasrc is already set - error CS0012

    Hello, In screenshots 3 and 4, there are two issues that have to be solved manually. 1. The first is related to MSComDlg objects. In vb6 there exist only one single dialog object with several functionalities: print dialog, color dialog, open file dialog, etc. In .Net there are specific dialog objects according to their functionality. For instance, there is a openfile dialog, print dialog, etc. The VBUC tool converts every MSComDlg object into their respective equivalences in .Net, so if you find a single MSComDlg object in your VB6 form, the upgraded form in .Net would have as many .Net dialog objects as functioanlities detected in the original application. However, for non upgraded library elements of the original MSComDlg , it will create a stub class called UpgradeStubs.AXMsComDlg_AXCommonDialog. This stub class may reference enums or types defined in the MSComDlg Activex component. To avoid the error in screen 3 there are two paths: b. Verify what are the nn-upgraded elements for the UpgradeStubs.AXMsComDlg_AXCommonDialog instance created in that form and replace them by .Net functionality. a. Include a reference to the MSComDlg object and then perform (a). 2. In regards with the second issue (screenshot 4), the error is generated because rst that is declared as object and in runtime it's created as ADORecordsetHelper (implementation of a .Net DataSet) is being cast to msdatasrc.DataSource and that casting is incorrect because msdatasrc .DataSource is an unmanaged type while ADORecordsetHelper is a .Net type. What is the datatype for cboTeileNr? I looks like it's an Activex object. Regards, OlmanQ
  7. OlmanQuesada

    Winsock not listening

    Hello Dion, Do you have a firewall that may be blocking connections attempts? You can try by implementing the winsock error event to trap error messages. My suggestion given you're now in .Net, replace the winsock by System.Net.Sockets. The communication between .Net and Interop/Activex components my be not as smoothly as expected, so using a pure .Net component could be the best option. Some guides about .Net sockets: https://docs.microsoft.com/en-us/dotnet/framework/network-programming/synchronous-client-socket-example https://docs.microsoft.com/en-us/dotnet/framework/network-programming/synchronous-server-socket-example
  8. OlmanQuesada

    Documentation for UpgradeHelper projects

    You can find inline documentation in the helper classes and you're also free to edit them. The recordset helper tries to infer the right command type, but when the basic clauses are not fulfilled it has to get the database schema to find if the recordset is populated by querying to a table name. Retrieving the schema has a very important impact on the performance, so in this case modifying the source code by using the exec keyword would help to reduce the performance. Regards,
  9. OlmanQuesada

    Documentation for UpgradeHelper projects

    Hello Michael, In my understanding, the recordset is populated by executing a stored-procedure. Could you provide us a quick sample of how the recordset is populated? If you use the "exec" keyword when executing stored procedures the results is the expected?
  10. OlmanQuesada

    rs.getProperties().Item("Unique Table")

    Hello, ADO.Net does not provide that functionality as classic ADO or ADODB does, that’s why the VBUC generate a stub indicating that property is not supported. In order to achieve the same functionality will require changes in your migrated code. The VBUC converts classic ADO components (like the recordset) to ADO.Net components. In specific, the recordset is migrated to a helper class that inherits from the System.Data.Dataset object. This class includes methods/properties to emulate the behavior of the classic Recordset when possible, but there are some of them that cannot be emulated as ADO.Net does not provide any way to recreate them. For instance, using the <Recordset>.Properties(“Unique Table”) to indicate which table to be updated when the recordset is populated via a SQL JOIN statement. To get the functionality described above, you can use the <RecordsetHelper>, the Update/Insert/Select clauses must be provided in order to perform those operations. You can use the SQlInsertQuery, SQLUpdateQuery and SQLDeleteQuery properties of the RecordsetHelper class to indicate the Sql statement to use to execute SQL operations. As a workaround to this, Update/Insert/Delete SQL must be specified to perform those operations (here some info from Microsoft : https://docs.microsoft.com/en-us/aspnet/web-forms/overview/data-access/advanced-data-access-scenarios/updating-the-tableadapter-to-use-joins-cs)
  11. Oracle Data provider (ODP.Net) in a migrated project Old Visual Basic 6 applications interacting with Oracle databases may rely on the MSDAORA driver in the connection string to establish such communication when that code is converted to .NET, the Visual Basic Upgrade Companion (VBUC) will keep the same connection string and therefore be use the old MSDAORA driver. But, in .NET we can take advantage of the Oracle Data Provider (ODP.Net) technology developed by Oracle instead. The following VB6 code shows a database connection though the MSDAORA provider: Dim oConn As ADODB.Connection Set oConn = New ADODB.Connection oConn.ConnectionString = "Provider=MSDAORA.1;Password=" & sPassword & ";User ID = " & sUser & "; Data Source= " & sServer & ";Locales Identifier=1033" oConn.Open When this code is converted to .NET using the VBUC the code look like this: DbConnection oConn = UpgradeHelpers.DB.AdoFactoryManager.GetFactory().CreateConnection(); oConn.ConnectionString = "Provider=MSDAORA.1;Password=" + sPassword + ";User ID = " + sUser + "; Data Source= " + sServer + ";Locales Identifier=1033"; //UPGRADE_TODO: (7010) The connection string must be verified to fullfill the .NET data provider connection string requirements. More Information: https://www.mobilize.net/vbtonet/ewis/ewi7010 oConn.Open(); Note: ADODB component is migrated to ADO.NET using System.Data.Common and helper classes. As you can see the migrated application is still using the MSDAORA provider. If your final goal is taking full advantage of the .NET technology, you may want to replace that provider for the ODP.Net developed by Oracle. In this case, you need to go to the Oracle Data Provider .NET download page (http://www.oracle.com/technetwork/topics/dotnet/index-085163.html) and choose the required version of this .NET component. After installing and configuring the ODP.NET component on your machine you will have to make some minor adjustments to the migrated code: 1. Add the Oracle.DataAccess.Client factory Mobilize helper classes use a DVProviderFactory to create the right ADO.NET object according to the database connection provider in use: OleDb providers will use the System.Data.OleDb namespace. This is valid for MS-Access files and any OleDb provider like the MSDAORA one. ODBC providers will use the System.Data.ODBC namespace SqlServer can use the System.Data.SqlClient namespace Oracle providers for .NET will use Oracle.DataAccess.Client namespace that comes with the ODP.NET installer. If this assembly is not installed an exception will raise at runtime. To use the Oracle.DataAccess.Client, find the method Load DefaultFactorySettings that comes in the AdoFactoryManager class from the UpgradeHelpers.DB.Essentials helper project and uncomment-out the line: factorySection.Add("Oracle", new FactoryConfigurationElement("Oracle", "Oracle.DataAccess.Client", DatabaseType.Oracle, false)); and comment-out this line: factorySection.Add("Oracle", new FactoryConfigurationElement("Oracle", "Oracle.DataAccess.Client", DatabaseType.Oracle, false)); So, this method should looks like this: private static void LoadDefaultFactorySettings(Dictionary<string, FactoryConfigurationElement> factorySection) { factorySection.Add("Access", new FactoryConfigurationElement("Access", "System.Data.OleDb", DatabaseType.Access, true)); factorySection.Add("SQLServer", new FactoryConfigurationElement("SQLServer", "System.Data.SqlClient", DatabaseType.SQLServer, false)); //New Changes factorySection.Add("Oracle", new FactoryConfigurationElement("Oracle", "Oracle.DataAccess.Client", DatabaseType.Oracle, false)); //factorySection.Add("Oracle", new FactoryConfigurationElement("Oracle", "System.Data.OracleClient", DatabaseType.Oracle, false)); factorySection.Add("ODBC", new FactoryConfigurationElement("ODBC", "System.Data.Odbc", DatabaseType.Access, false)); } With these changes, any ADO.NET object (DBCommands, DBConnections, etc) created using the UpgradeHelpers.DB.AdoFactoryManager.GetFactory() will be instantiated using the types defined in Oracle.DataAccess.Client namespace. 2. Correct the Connection String As illustrated in the VB6 code above, the connection string is using an OLEDb provider (MSDAORA), so we need to change that string to send the parameters required by the ODP.NET provider: string conStr = "Data Source=(DESCRIPTION=(CID=GTU_APP)(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST="+ sServer + ")(PORT="+ sPort + ")))(CONNECT_DATA=(SID="+ sSID + ")(SERVER=shared)))"; conStr = conStr + ";" + "User Id=" + sUser + ";Password=" + sPassword; DbConnection oConn = UpgradeHelpers.DB.AdoFactoryManager.GetFactory().CreateConnection(); oConn.ConnectionString = conStr; oConn.Open(); Basically, these are the only changes in your code to establish an Oracle DataBase connection using ODP.NET. happy migration!
  12. OlmanQuesada

    MSDATASRC... doesn't work in code!

    Hi Devon, the cbo is a Activex Combobox, so it's not a .Net control. Because of that, the RowSource property cannot be assigned to a .Net class. At this point there are two alternatives: 1. Change the AxDataCombo by a .Net control. In that case it would be compatible with other .Net classes/components. This have to be done in a manual fashion as currently the VBUC does not automatically convert that control to a .Net one. 2. Migrate the vb6 code using ADODB via Com Interop (see attached file). By doing this, all classic adodb code willnot be converted to ADO.Net, so the cbo.RowSource and the rst object may be compatible. However, as you're converting your code to .Net my suggestion would be the option 1. Regards, OlmanQ
  13. OlmanQuesada

    No project converts

    Hi, Sorry for the misunderstanding. The VBUC requires all the references to all third party components as well as any library that is part of the VB6 project . The best way to validate that is compiling the vb6 code in the same machine where the VBUC tool is installed. You can get more information about how to prepare the code to be migrated by visiting our VBUC System Requirements page https://www.mobilize.net/support/documentation/VBUC-system-requirements Please, verify the vb6 code in your machine compiles and them try converting that code. OlmanQ
  14. OlmanQuesada

    Control array not upgraded

    Hi Good to hear that. OlmanQ
  15. OlmanQuesada

    Control array not upgraded

    Hi FGallagher, Is that possible to provide more info about the issue you are having? If would be helpful to get the following: 1. log file of the migration. You can get the log file by going to the Upgrade tab at the top of the VBUC and click on "Open Upgrade Log" button. 2. Screenshot of the error. Thanks, OlmanQ
×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Terms of Use