Lparameters kID
nhandle=SQLSTRINGCONNECT("Driver={Microsoft Access Driver (*.mdb)};dbq=E:\vfplx\vfp3\ybbdy.mdb;pwd=")
csql="Select * From kq where kq.kd=?kid"
nResult = SQLExec(nHandle, cSQL, "lsb")
SQLDisconnect(nHandle)
Return lsb.name&&----->这里如何返回多个字段?比如:lsb.性别 lsb.工资 lsb.职务
------解决方案--------------------------------------------------------
写COM更得这么写了,OO的,再贴个例子吧:
obj=get_record()
?obj.f1
?obj.f2
?obj.f3
FUNCTION get_record
CREATE CURSOR tmp (f1 c(10),f2 c(10),f3 m)
INSERT INTO tmp values("aaa","bbb",'mmm')
SELECT tmp
SCATTER MEMO NAME thisrecord
USE IN tmp
RETURN thisrecord
ENDFUNC
------解决方案--------------------------------------------------------