Sub Initialize
On Error Goto errormsg
dim sql as string
dim fldLst as new lcfieldList
dim lcCaTypeName as lcfield
dim josndata as string
dim isNext as Boolean
dim strTemp as string
dim index as integer
sql="select * from S010_MoldCata"
josndata =""
strTemp = ""
isNext = false
call WF_Con.execute(sql,fldLst) '对数据到数据集fldLst中去
set lcCaTypeName = fldLst.lookup("MoldCataName")
while WF_Con.fetch(fldLst)>0
strTemp =|{"text":"|+lcCaTypeName.text(0) +|"}|
if isNext = true then
josnData = josnData +","+strTemp
else
josnData = josnData +strTemp
isNext = true
end if
wend
josnData = |[| +josnData + |]|
Msgbox josnData
print "Content-Type:application/text;charset=utf-8"
print josnData
Exit Sub
errormsg:
Msgbox "Rule Error:" & Str(Erl) & " " & Error
End Sub