乱码问题
1 Select Case dw2 Case "0": sql1 = ""
3 Case "1": sql1 = " and (sgdw like '作业5%' or sgdw like '作业1%')"
4 Case "2": sql1 = " and sgdw like '作业2%'"
5 Case "3": sql1 = " and (sgdw like '作业3%' or sgdw like '作业一%' or sgdw like '作业二%' or sgdw like '作业三%' or sgdw like '作业四%' or sgdw like '大修%')"
6 End Select
7 sql = "select count(*) from dda02 where to_char(wgrq,'yyyy/mm/dd')>='" & rq & "' and to_char(wgrq,'yyyy/mm/dd')<'" & rq1 & "' and (jb like '1%' or jb='X1')" & sql1
8 sql2 = "select count(*) from dda02 where to_char(wgrq,'yyyy/mm/dd')>='" & rq & "' and to_char(wgrq,'yyyy/mm/dd')<'" & rq1 & "' and (jb like '3%' or jb='X3')" & sql1
9 Set rs = OraDatabase.DbCreateDynaset(sql, 0&)
10 Set rs = OraDatabase.DbCreateDynaset(sql, 0&)
11 y0 = rs.fields(0).Value
12 rs.Close
dda02 是oracle中的一张表
在第9行中的sql中出现乱码,位置在第7行的sql1中,也就是sql1为 : "作业5%" 等 有中文时出现,换别的机子就没问题
我不知道为什麽?怎麽解决,请高手们指教