Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all articles
Browse latest Browse all 46681

Validate CSV

$
0
0

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.

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


Viewing all articles
Browse latest Browse all 46681

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>