PB取得服务器系统时间的源代码
datetime ldt_datestring ls_sqlchoose case lower(as_dbms)case "oracle"//oraclels_sql = "select sysdate fromsys.dual"case "sqlserver"//ms sql serverls_sql = "select no
datetime ldt_date
string ls_sql
choose case lower(as_dbms)
case "oracle"
//oracle
ls_sql = "select sysdate fromsys.dual"
case "sqlserver"
//ms sql server
ls_sql = "select now() "
case "sybase","syc adaptive serverenterprise"
//sybase
ls_sql = "selectgetdate()"
case else
ls_sql = "select now() "
end choose
Declare l_cursor dynamic cursor for Sqlsa;
Prepare Sqlsa from :ls_sql;
Open dynamic l_cursor;
if Sqlca.SQLCode = 0 then
Fetch l_cursor into :ldt_date;
end if
if sqlca.SQLCode <> 0 then
ldt_date = Datetime(Today(), Now())
end if
Close l_cursor;
return ldt_date
开放原子开发者工作坊旨在鼓励更多人参与开源活动,与志同道合的开发者们相互交流开发经验、分享开发心得、获取前沿技术趋势。工作坊有多种形式的开发者活动,如meetup、训练营等,主打技术交流,干货满满,真诚地邀请各位开发者共同参与!
更多推荐
所有评论(0)