Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7916149
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T14:42:03+00:00 2026-06-03T14:42:03+00:00

I need your help to validate what is causing this error. This is the

  • 0

I need your help to validate what is causing this error.

This is the Stack Trace:

[NullReferenceException: Object variable or With block variable not set.]
Microsoft.VisualBasic.CompilerServices.Container..ctor(Object Instance) +498372
   Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateCall(Object Instance, Type Type, String MemberName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack, Boolean IgnoreReturn) +112
   MicrositioAmece.EAN_Individual.Uno_a_Uno(String iNombreGenerico, String iMarca, String iContenido, String iUnidadMedida, String iVariante) in C:\Users\vflores\Documents\MicrositioAmeceDevelopment\EAN_Individual.aspx.vb:292
   MicrositioAmece.EAN_Individual.btnEnviar_Click(Object sender, EventArgs e) in C:\Users\vflores\Documents\MicrositioAmeceDevelopment\EAN_Individual.aspx.vb:96
   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565

And this is the code:

 Function Uno_a_Uno(ByVal iNombreGenerico As String, ByVal iMarca As String, ByVal iContenido As String, ByVal iUnidadMedida As String, ByVal iVariante As String)
    Uno_a_Uno = False
    If iNombreGenerico = "" Or iMarca = "" Or iContenido = "" Or iUnidadMedida = "" Or iVariante = "" Then
        Uno_a_Uno = False
        Exit Function
    End If

    Dim objSiebelApp, blogStat
    Dim oSiebApp, strCnxn, logstat
    Dim oBusObj, oBusComp, bHayRegistro
    Dim oBusCompEAN13, oBusCompEAN13Detalle
    Dim oBCPickNumContacto, oNumContacto
    Dim oBCPickTipoCodigo, oTipoCodigo
        '______________Conecta a Siebel
    oSiebApp = CreateObject("SiebelDataControl.SiebelDataControl.1")
    strCnxn = Replace(ConfigurationSettings.AppSettings("ConnSiebel"), "'", Chr(34))
    Dim us As String = ConfigurationSettings.AppSettings("usrSiebel")
    Dim pw As String = ConfigurationSettings.AppSettings("pwSiebel")
    logstat = oSiebApp.Login(strCnxn, us, pw)
    If Not logstat Then
        strCnxn = Replace(ConfigurationSettings.AppSettings("ConnSiebel"), "'", Chr(34))
        logstat = oSiebApp.Login(strCnxn, us, pw)
        If Not logstat Then
            'lblError.Text = "Error al conectar: " & CStr(logstat1) & " Desc: " & oSiebApp1.GetLastErrText & "numErr: " & oSiebApp1.GetLastErrCode
            lblError.Text = "<br /><div class='Aviso_Error'><span class='Aviso_contenido'>" & _
                    "Error al Conectar con la base de datos, por favor intentelo más tarde." & _
                    "</span></div><br />"
        End If
        Exit Function
    End If
    oBusObj = oSiebApp.GetBusObject("Account")
    oBusComp = oBusObj.GetBusComp("Account")
    oBusComp.ActivateField("CSN")
    oBusComp.ActivateField("Name")
    oBusComp.SetViewMode(3)
    oBusComp.ClearToQuery()
        oBusComp.SetSearchExpr("[CSN] LIKE " + User.Identity.Name) '140418") '
    oBusComp.ExecuteQuery(1)
    bHayRegistro = oBusComp.FirstRecord
    If bHayRegistro Then
        oBusCompEAN13 = oBusObj.GetBusComp("Codigos EAN13 Completos")
        Call oBusCompEAN13.NewRecord(1)
        'oBusCompEAN13.SetFieldValue("Campo", "Valor")
        'Pick List Contacto
        oBCPickNumContacto = oBusCompEAN13.GetPicklistBusComp("Num Contacto")
        oBCPickNumContacto.ActivateField("Numero de contacto")
        oBCPickNumContacto.SetViewMode(3)
        oBCPickNumContacto.ClearToQuery()
        'oBCPick.SetSearchSpec("ACA SERÍA EL TIPO DE CONTACTO", "RESPONSABLE DE CODIGOS")
        oBCPickNumContacto.ExecuteQuery(1)
        If oBCPickNumContacto.FirstRecord() Then
            oBCPickNumContacto.Pick()
        End If

        'Pick List Tipo de Código
        oBCPickTipoCodigo = oBusCompEAN13.GetPicklistBusComp("Tipo de Codigo (MOSTRAR)")
        oBCPickTipoCodigo.ActivateField("Numero de contacto")
        oBCPickTipoCodigo.SetViewMode(3)
        oBCPickTipoCodigo.ClearToQuery()
        oBCPickTipoCodigo.SetSearchSpec("Tipo de Codigo", "R")
        oBCPickTipoCodigo.ExecuteQuery(1)
        If oBCPickTipoCodigo.FirstRecord() Then
            oBCPickTipoCodigo.Pick()
        End If

        oBusCompEAN13.InvokeMethod("NuevoCodigo", "Null")
        sCodigoCompleto = oBusCompEAN13.GetFieldValue("Codigo Completo")
        If (oBusCompEAN13.WriteRecord() = False) Then
            'lblError.Text = "No fue posible asignar el código individual:" & CStr(logstat) & " Desc: " & oSiebApp.GetLastErrText & "numErr: " & oSiebApp.GetLastErrCode
            lblError.Text = "<br /><div class='Aviso_Error'><span class='Aviso_contenido'>" & _
                "No fue posible asignar el código, por favor intentelo más tarde." & _
                "</span></div><br />"
            Exit Function
        Else
            oBusCompEAN13Detalle = oBusObj.GetBusComp("Detalle EAN13")
            Call oBusCompEAN13Detalle.NewRecord(1)
            oBusCompEAN13Detalle.SetFieldValue("Nombre Generico", iNombreGenerico)
            oBusCompEAN13Detalle.SetFieldValue("Marca Producto", iMarca)
            oBusCompEAN13Detalle.SetFieldValue("Contenido Neto Producto", iContenido)
            oBusCompEAN13Detalle.SetFieldValue("Unidad Medida Cont Neto", iUnidadMedida)
            oBusCompEAN13Detalle.SetFieldValue("Tipo Producto", iVariante)
            If (oBusCompEAN13Detalle.WriteRecord() = False) Then
                'lblError.Text = "No fue posible guardar el detalle del código individual, sin embargo el código fue asignado: " & sCodigoCompleto '& CStr(logstat) & " Desc: " & oSiebApp.GetLastErrText & "numErr: " & oSiebApp.GetLastErrCode
                lblError.Text = "<br /><div class='Aviso_Error'><span class='Aviso_contenido'>" & _
                    "No fue posible guardar el detalle del código individual, sin embargo el código fue asignado: " & sCodigoCompleto & _
                    "</span></div><br />"
                Exit Function
            Else
                Uno_a_Uno = True
            End If
        End If
        End If
        'limpio los objetos
        Call oSiebApp.LogOff()
        objSiebelApp = Nothing
        blogStat = Nothing
        oSiebApp = Nothing
        strCnxn = Nothing
        logstat = Nothing
        oBusObj = Nothing
        oBusComp = Nothing
        bHayRegistro = Nothing
        oBusCompEAN13 = Nothing
        oBusCompEAN13Detalle = Nothing
        oBCPickNumContacto = Nothing
        oNumContacto = Nothing
        oBCPickTipoCodigo = Nothing
        oTipoCodigo = Nothing
    Return Uno_a_Uno
End Function

As you can see the error is returned on line 292 Uno_a_Uno function. I’ve searched but I can not resolve it is causing.

Thank you very much for your support.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T14:42:04+00:00Added an answer on June 3, 2026 at 2:42 pm

    Or OBCPickNumContacto is Nothing, meaning that your previous call to
    oBusCompEAN13.GetPicklistBusComp(“Num Contacto”) fails for some reason or,
    in alternative, is possible that ActivateField fails internally.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need your help to translate a query into pyes. This query is working
I need your help with this one again. I want to send special characters
I really need your help for this. I am relatively new to programming and
I need your help to understand this better. This is my case. I have
Need your help figuring this thing out. Scenario: On my JSP, I am trying
Need your help to get the max of CAP_PRICE based on certain criteria in
I need your help. Say I have a code inside a for statement similar
I need your help again :) I'm trying to do a plugin with jQuery
I need your help. I'm trying to install php_apc.dll into my php directory. So
I need your help. I have a php script to send email to people

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.