語法:
'=======================================================
Private Sub Form_Load()
ConnStr = "Provider=MSDASQL.1;Persist Security Info=False;" & _
"Data Source=CC_walsin1_07_05_08_09_57_04R"
Sql_Data = "SELECT JobName, JobProcessCode, JobBatchSet, " & _
"FLOOR(JobBatchAct * 10 + 0.5) * 0.1" , JobStatus, LastUser, LastAccess " & _
"FROM UA#JobArc"
Adodc1.ConnectionString = ConnStr
Adodc1.CommandType = adCmdText
Adodc1.RecordSource = Sql_Data
Adodc1.Refresh
End Sub
'=======================================================
修改如上
'四捨五入取小數1位
"FLOOR(JobBatchAct * 10 + 0.5) * 0.1"
'四捨五入取小數2位
"FLOOR(JobBatchAct * 100 + 0.5) * 0.01"
'四捨五入取小數3位
"FLOOR(JobBatchAct * 1000 + 0.5) * 0.001"
依此類推