(GoogleTraductor)
Hello greetings. Colleagues tell them my problem. I have an income of a CSV I read it with a conpeek which I have to accept or grasp it before it enters the data to my table. What happens is that whenever an unsupported data recording and Date, Real, or Enum, in showing me see any error only entered as empty fields ..As catch that error ?? or some way to tell my board does not accept null data. I tried to TypeOf or a settlement. I need to give equal TransDate EDT as a stop to equal it and enter and capture the error, this logic believe that official or a way that the table is not empty data are accepted and be shown on screen. Greetings hopefully can help me.
Español
Hola Saludos. Colegas les cuento mi problema. Tengo un ingreso de un CSV que lo leo con un conpeek al cual lo tengo que validar o captar antes de que ingrese los datos a mi tabla. Lo que pasa es que cada vez que registrar un dato no compatible como en Date, Real, o Enum, en ves de mostrarme algún error solo los ingresa como campos vacÃos .Como captar ese error?? o alguna manera de decirle a mi tabla que no acepte datos nulos. Lo intente con TypeOf o con un arreglo. necesito hacerle una igualdad a transdate con un EDT como parar que lo iguale e ingrese y capte el error, esa lógica creo que funcionaria o una manera de que en la tabla no se acepten datos vacÃos y poder mostrarlos en pantalla. Saludos ojala me puedan ayudar.
This is my code that just enter but does not capture the error:
readCon = csvFile.read();
while (csvFile.status() == IO_Status::OK)
{
readCon = csvFile.read();
if (conPeek(readCon, 4))
{
try{
if (typeOf(str2Date(conpeek(readCon, 4),123)) == Types::Date){
transdate_ = conPeek(readCon, 4);
}else{
throw Global::error("Error en TransDate.");
}
}catch{
info("error al cargar");
}//try
}//if
Mitabla.CampoDate = str2Date(transdate_,123);
}//while
*This post is locked for comments
I have the same question (0)