Jump to content

Search the Community

Showing results for tags 'ado'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General Discussion
    • Get Started
    • WebMap
    • VBUC
    • Silverlight Bridge
    • SnowConvert
    • Blogs

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Found 1 result

  1. VB6 code: If svrqAuthorise Is Nothing Then lvstrSQL = "" ASQL lvstrSQL, "UPDATE tblEEntityDuplicates" ASQL lvstrSQL, "SET" ASQL lvstrSQL, "AuthorisedBy1 = " & FormatSQL(pvobjContext.UserID) & "," ASQL lvstrSQL, AuditSQL(pvobjContext, ecSQLbuilder.UpdateModifyFields) & "," ASQL lvstrSQL, "ProcessStatus = 1 ," ASQL lvstrSQL, "ProcessStatusMessage = 'Authorised 1'" ASQL lvstrSQL, "WHERE EntityRefToMoveFrom = ?" Set svrqAuthorise = New ADODB.Command svrqAuthorise.CommandText = lvstrSQL svrqAuthorise.ActiveConnection = pvobjContext.Connection End If svrqAuthorise.Parameters(0) = mvlngEntityRefToMoveFrom Generated code: if (svrqAuthorise_Authorise1 == null) { lvstrSQL = ""; UCommon.ASQL(ref lvstrSQL, "UPDATE tblEEntityDuplicates"); UCommon.ASQL(ref lvstrSQL, "SET"); //UPGRADE_WARNING: (1068) FormatSQL() of type Variant is being forced to string. More Information: https://www.mobilize.net/vbtonet/ewis/ewi1068 // EWI Solution Progress: EWI ID:1068 Status: TODO Fixed By: Asmita Date: 03/10/2019 UCommon.ASQL(ref lvstrSQL, "AuthorisedBy1 = " + Convert.ToString(UCommon.FormatSQL(pvobjContext.UserID)) + ","); UCommon.ASQL(ref lvstrSQL, UContext.AuditSQL(pvobjContext, UEnums.ecSQLbuilder.UpdateModifyFields) + ","); UCommon.ASQL(ref lvstrSQL, "ProcessStatus = 1 ,"); UCommon.ASQL(ref lvstrSQL, "ProcessStatusMessage = 'Authorised 1'"); UCommon.ASQL(ref lvstrSQL, "WHERE EntityRefToMoveFrom = ?"); svrqAuthorise_Authorise1 = UpgradeHelpers.DB.AdoFactoryManager.GetFactory().CreateCommand(); svrqAuthorise_Authorise1.CommandText = lvstrSQL; svrqAuthorise_Authorise1.Connection = pvobjContext.Connection; UpgradeHelpers.DB.DbConnectionHelper.ResetCommandTimeOut(svrqAuthorise_Authorise1); } svrqAuthorise_Authorise1.Parameters[0].Value = mvlngEntityRefToMoveFrom; The problem is parameters array is no initialized in converted code so it leads to a runtime exception. How can I solve it in a way I don't need to go over every database access method and manually initialize parameters? Best regards!
×
×
  • Create New...

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