'只取單一欄紀錄 Function getDataConp(FieldName,cmdstr) '//getDataComp(欄位名稱,SQL指令) Set npf=server.createObject("ADODB.RECORDSET") npf.open cmdstr,copc,3,2 IF not npf.EOF THEN datavalue=npf(FieldName) END IF npf.close() getDataConp=datavalue End Function