Connection Con; Statement Stmt; ResultSet R;
Con = new Connection();
Stmt = Con.createStatement();
sqlString = "SELECT * FROM GET_EMPLOYEE_PRIMS WHERE DSEMPLID='A1' AND DATAAREAID='" + curExt()
+"' "
+ " AND TRANSDATE<CAST('" +
date2str('2001/09/29',321,2,3,2,3,4) + "' AS datetime)"
+ " AND TRANSDATE> CAST('" +
date2str('2003/09/29',321,2,3,2,3,4)+ "' AS datetime)";
R = Stmt.executeQuery(sqlString);This code runs on Sql Server Query Analyzer successfully. I try to run from any class on Axapta, but it doesn't work!!
Error info is :
[Microsoft][ODBC SQL Server Driver][SQL Server]The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.
------------------------ Yahoo! Groups Sponsor ---------------------~--> Upgrade to 128-Bit SSL Security! http://us.click.yahoo.com/p7cEmB/s7qGAA/yigFAA/saFolB/TM ---------------------------------------------------------------------~->
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/

