public int CargaMasiva(string pstrTipo, string pstrDatos) { string strDatos = pstrDatos; ConsumerDatos objConsumerDatos; int intLar = 4000;//511; int intPosIni = 0; int intPosFin = 0; try { if (pstrDatos.Length > intLar) { while (intPosIni < pstrDatos.Length) { if (intPosIni + intLar <= pstrDatos.Length) { strDatos = pstrDatos.Substring(intPosIni, intLar); } else { strDatos = pstrDatos.Substring(intPosIni); } intPosFin = strDatos.LastIndexOf("¬"); if (intPosFin > 0) { strDatos = pstrDatos.Substring(intPosIni, intPosFin); intPosIni += intPosFin; } else { intPosIni = pstrDatos.Length; } objConsumerDatos = new ConsumerDatos(); objConsumerDatos.CargaMasiva(pstrTipo, strDatos); } } else { objConsumerDatos = new ConsumerDatos(); objConsumerDatos.CargaMasiva(pstrTipo, pstrDatos); } } finally { objConsumerDatos = null; } return(1); }