Click here to Skip to main content
15,892,768 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hallo everyone,

i have an select query where i select one column from mysql table database and store it into datatable before i display it in crystal report. when i run my project, there is no error Occurred, but there is no data display in the crystal report, when i set a breakpoint and check my datatable contain, in the column that i want to display write something like "System.byte" suppose to be display data that i select from the database. why it is happend? is any others way for me to fix it?


SELECT CONCAT(LPAD(FLOOR(extra_ot/60),2,'0'),':',LPAD((extra_ot MOD 60 ),2,'0'),':00') AS Extra_O
Posted
Updated 18-Jan-18 7:41am

You have to cast it as a char first.
SQL
SELECT CONCAT(cast(LPAD(FLOOR(extra_ot/60),2,'0') as char(20)),':',cast(LPAD((extra_ot MOD 60 ),2,'0') as char(20)),':00') AS Extra_O
 
Share this answer
 
Adding this in connection settings did the trick : 

;Allow User Variables=True;Respect Binary flags=false
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900