我曾经制作的一个《课文管理》中用到的程序代码段:
--取得数据库中的名称纪录,每个纪录以回车符隔开
Database:="BookDSN"
repeat with b_i:=1 to ListCount(sheet)
ItemString:=ItemString^Return^Level2^sheet[b_i]
repeat with j:=1 to ListCount(lei_num[b_i])
CallScriptIcon(@"SQL"
ODBChandle:=ODBCOpen(WindowHandle,"ODBCerror",Database,"",""
ODBCdata:=ODBCExecute(ODBChandle,SQLstring)
ODBCClose(ODBChandle)
RecordCount:=LineCount(ODBCdata)
if RecordCount<>0 then
ItemString:=ItemString^Return^Level3^leixing_1[lei_num[b_i][j]]
repeat with k:=1 to RecordCount
ItemString:=ItemString^Return^Level4^GetLine(ODBCdata,k)
end repeat
end if
end repeat
end repeat
详细介绍:
awfans.com/shop_view.asp?id=2