Jump to content

All Activity

This stream auto-updates     

  1. Last week
  2. Earlier
  3. JuanManuel

    Mobilize.Net VBUC Custom Mappings

    Mobilize.Net VBUC Custom Mappings.pdf
  4. JuanManuel

    Mobilize.Net VBUC Getting started Guide

    This document is intended for the VBUC tool created by Mobilize. The document introduces the user on how to properly setup the application, how to do your first migration process and many other cool features. The guide provides tips and recommendations but is not written in stone, we want our users to play around with the tool. Happy Migration Mobilize.Net VBUC Getting started Guide.pdf
  5. VeraBraswell

    VB6 to .NET POC

    Thank you so much for this great info!
  6. willvv

    VB6 to .NET POC

    Hello and thanks for your interest in our migration technology. There are several things that need to be done before migrating a VB6 application, including: - Completing a source dev environment. This should include all the source VB6 code and third party components. The code must compile and be debuggable, this is important both for the migration process and afterwards when you are performing manual changes to the migrated code to debug source and migrated applications side-by-side. - Defining the strategy for third party components. If there are libraries not supported by the VBUC they can either be used through COM Interop (some old components cannot be used this way), manually replaced by .NET equivalents or our team can customize the VBUC for you to automatically convert this component to another one in .NET (this is especially useful for elements used in many places). - Identifying the best set of migration options to make sure the migrated code is the best for your source VB6. This means executing the migration process a few times and comparing the results and the issues remaining in such code. - Once the code is migrated you can move it to a .NET environment as long as you have already registered any COM components that you will leave in the migrated application. Otherwise you might have problems compiling the application. This doesn't have to be a separate environment although most people prefer to do so. Our team can help you with all these steps and we even offer a quick start package that includes some on-site work with one of our migration architects to get you started without wasting any time. We can also execute part or all the project if you prefer so. Please don't hesitate to contact us at info@mobilize.net or by phone at +1.425.609.8458. Regards, - Will
  7. VeraBraswell

    VB6 to .NET POC

    What preparation or groundwork is required before a proof of concept (POC) can be conducted to convert VB6 to .NET? Is it necessary to build out a new .NET DEV environment 1st?
  8. 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!
  9. AlbertoEspinoza

    Upgrade From TrueDBGrid 6.0 to TrueDBGrid 7.0

    Upgrade from TDBG 6 to TDBG 7 Summary The Visual Basic Upgrade Companion supports TrueDBGrid 7.0 and later versions, but not TrueDBGrid version 6.0. To migrate code containing version 6 controls, you must first upgrade TDBG 6.0 to TDBG 7.0 Problem Description TrueDBGrid 6.0 defines some properties of the grid in the frx file, while TrueDBGrid 7.0 defines them in the frm file. When a project in Visual Basic has a form, which contains a grid of type True DB Grid 6.0, some characteristics, such as properties of columns, positions, and more are defined in the form's frx file. Since the VBUC will only take the properties defined in the frm file, those properties embedded in the frx file are not migrated. So, to solve this issue, first migrate the version 6.0 controls to version 7.0 prior to migration with VBUC. How to Upgrade to Version 7 In your VB6 development machine, install TrueDBGrid 7.0 You can get an evaluation from this link: http://download.componentone.com/pub/truedbgridpro7/eval Copy to C:\Windows\System32 the next dll: tdbg8mu.dll You can get it from this link: http://gccontent.blob.core.windows.net/gccontent/blogs/legacy/c1/2011/07/tdbg8mu1_utility.zip Register that DLL using regsvr32 Modify the file C:\Windows\vbaddin.ini adding the next line: TDBG7MU.Connect=2 In Visual Basic 6, on the menu Add-Ins/Add-in select the option "Load on startup" for "TrueDBGrid 7.0 Migration Utility" Restart Visual Basic The following button will appear on the upper menu: Upgrade from TrueDBGrid 6.0 to TrueDBGrid 7.0 and from TrueDBGrid (OLEDB) 6.0 to TrueDBGrid (OLEDB) 7.0 (if applies) Open each form and press CTRL + S to save all changes Check that each form has changed, for example: Sometimes the changes won't be applied to the forms, if that happens some workaround will be needed: Add a grid (Version 7.0) on the form Save the form Delete the grid Save again Check changes were applied to the forms Post-migration to .NET After the migration to .NET, in C# some visual elements may need correcting. For example, This is how a grid should look after the migration using version 7 of TrueDBGrid: Because the designer file loaded incompletely, this is how the grid looks after the migration (column width incorrect): The following steps can fix these kinds of problems: Modify any property of the grid, like changing the position of an element or modifying the name of the grid. These changes should be done in the code of the designer file (designer.cs) Save and close all files Re-open the form: the grid should look correct If it's necessary, don't forget to undo all changes previously applied to the designer file. This workaround is needed because sometimes the designer isn't correctly rendered in the form, so when a new change is applied, it needs to load all the designer settings. Upgrade from TDBG 6.0 to TDBG 7.0.pdf
  10. 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
  11. Devon

    MSDATASRC... doesn't work in code!

    This is converted code from a project. It is a basic combo box loading routine. The cbo.RowSource is an MSDATASRC an the rst is the created / converted ADORecordSetHelper. They aren't compatible! Okay so what can I assign in code to make this work?
  12. JuanManuel

    Not converting VBScript classes in Classic ASP

    Hi Nas, I would like to ask for two things. Could you provide the Log file generated and also could you provide the project/solution you are using. It'd help us find the issue. Thanks.
  13. Hi, There is only one class in the file. The file Query.asp in my previous post is complete. I have also looked in all files at classes/methods/variables named 'query' and have not found any occurrences.
  14. AlbertoEspinoza

    vb6 to c# upgrade problem

    Hello Ocinar, Could you provide that sample code that you tried to migrate? It'd help us find the issue, at least if it's possible we'd like to check the code in CFunction file and Module_Globals. Thanks.
  15. ocinar

    vb6 to c# upgrade problem

    Hello. I wanted to try a small Project to from vb6 to c# but upgrade fails. Can you help me about this. Thank you. VBUMLOGFILE.log
  16. John Browne

    No project converts

    Glad we could help!
  17. ident

    No project converts

    Thank you OlmanQuesada for your time. It's appreciated. John, you were correct. The instructions worked. Thank you, both. Good response time also. Where is the rep button for you guys?
  18. John Browne

    No project converts

    Based on your log file, it looks like you might have a corrupted installation of VBUC. It happens--I had the same problem not that long ago. Good news is you can follow the steps here to fix it: https://www.mobilize.net/vbtonet/error-retrieving-the-com-class-factory-for-component-with-clsid-7b11c67c12-105a-4f42-a5c8-cb9070f2855a7d-failed-due-to-the-following-error-80040154
  19. 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
  20. OlmanQuesada

    Control array not upgraded

    Hi Good to hear that. OlmanQ
  21. JuanManuel

    Not converting VBScript classes in Classic ASP

    Hi Nas, We were able to reproduce the error in a very specific scenario. The issue happens only if the ASP file has two classes with the same name. For instance, if you have an ASP file with only one class “Query” the VBUC delivers the expected output. If the user has the name of the class duplicated in the same file the error occurs as you state, can you please check if you have the class “Query” in the same file without noticing.
  22. Nas

    Upgrade hangs

    Thank you OlmanQuesada. Recompiling all components has fixed the issue. Nas
  23. The VBUC does not convert all asp files. The code below is such an example Original: \general\data\app_code\Query.asp <% Class Query Private m_commandText Private m_commandTypeEnum Private m_commandParameters Public Property Let CommandText(strText) m_commandText = strText End Property Public Property Get CommandText() CommandText = m_commandText End Property Public Property Let CommandParameters(parameters) m_commandParameters = parameters End Property Public Property Get CommandParameters() CommandParameters = m_commandParameters End Property Public Property Let CommandTypeEnum(commandType) m_commandTypeEnum = commandType End Property Public Property Get CommandTypeEnum() CommandTypeEnum = m_commandTypeEnum End Property End Class %> Converted: \general\data\app_code\Query.aspx <script language="C#" runat="Server"> //@Class:Query </script> Is there a reason why they fail and how can I solve that? Thanks
  24. FGallagher

    Control array not upgraded

    Sorry, my bad. I had the "skeletons" option set in the VBUC. Now it works fine.
  25. ident

    No project converts

    Hi, I am a little confused to what you mean. VBUC was installed under the default installers location. The small project I am attempting to convert is on the desktop. Have i misunderstood you?
  26. 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
  27. OlmanQuesada

    No project converts

    Hi, The vb6 application you're converting compiles in the machine where the VBUC is installed? OlmanQ
  1. Load more activity
×