Expand my Community achievements bar.

Database search works in livecycle, but not in reader

Avatar

Former Community Member
TypeError: xfa.sourceSet.DataUsuario has no properties



I use a DSN for connect to oracle.



when i quit the code

"if (oCodigo.value == Codigo.rawValue)"

always show the same error, but show the last record of the query.



i set the Codigo.rawValue on textfield , before the line

TypeError: xfa.sourceSet.DataUsuario has no properties show the input value but after this line dont show anything.



The code is...



var nIndex = 0;



var oDB = xfa.sourceSet.DataUsuario.clone(1);



oDB.open();



oDB.first();



nIndex = 0;



while(oDB.nodes.item(nIndex).className != "command")



{



nIndex++;



}



oDB.nodes.item(nIndex).query.recordSet.setAttribute("stayBOF", "bofAction");



oDB.nodes.item(nIndex).query.recordSet.setAttribute("stayEOF","eofAction");



nIndex = 0;







while(xfa.record.nodes.item(nIndex).name != sDataConnectionName)



{



nIndex++;



}



var oRecord = xfa.record.nodes.item(nIndex);



var oNombre = null;



var oCodigo = null;



var oDepartamento = null;



Nombre.rawValue = null;



Departamento.rawValue = null;



for(var nColIndex = 0; nColIndex < oRecord.nodes.length; nColIndex++)



{



if(oRecord.nodes.item(nColIndex).name == "USUARIO")



{



oCodigo = oRecord.nodes.item(nColIndex);



}



else if(oRecord.nodes.item(nColIndex).name == "NOMBRE")



{



ombre = oRecord.nodes.item(nColIndex);



}



else if(oRecord.nodes.item(nColIndex).name == "DEPARTAMENTO")



{



oDepartamento = oRecord.nodes.item(nColIndex);



}



}



while(!oDB.isEOF())



{



if (oCodigo.value == Codigo.rawValue)



{



Departamento.rawValue = oDepartamento.value;



Nombre.rawValue = oNombre.value;



}



oDB.next();



thanks....
0 Replies