I have trace the source of the error and indeed that this part of the query: to_date(to_char(to_Date(nvl(i_date,to_date('19000101','rrrrmmdd'))),'rrrrmmdd') ||i_time, 'rrrrmmddhh24:mi:ss') inewdt
is the problem, however what I do not understand that it works fine with the classic powerbuilder but does not in the .net version. The query is identical without any change, any idea on whats wrong?