A
arhaha
Unregistered / Unconfirmed
GUEST, unregistred user!
用过IIS中ASP的ADO编程的都知道,可以这样使用ADODATASET:
set Conn = CreateOleObject("ADODB.Connection")
myDSN = "Driver={Microsoft Access Driver (*.mdb)};DBQ=countries.mdb"
Conn.open(mydsn)
writeln("CONN OK")
Mysql = "Select * from countries"
Set rs = Server.CreateOleObject("ADODB.recordSet")
rs.ActiveConnection = Conn
rs.open(Mysql)
Do while rs.eof = false
response.write rs("COUNTRY") ' "COUNTRY" 是countries.mdb中的一个字段
rs.MoveNext
loop
rs.close
conn.close
set rs = nothing
set conn = nothing
我的问题是:
上面的rs是一个对象,却可以像函数一样使用rs("COUNTRY")。但是如何在delphi的ActiveX/OLE Aotomation中实现像rs("COUNTRY")这样的方法呢?请高手指教!!!!
set Conn = CreateOleObject("ADODB.Connection")
myDSN = "Driver={Microsoft Access Driver (*.mdb)};DBQ=countries.mdb"
Conn.open(mydsn)
writeln("CONN OK")
Mysql = "Select * from countries"
Set rs = Server.CreateOleObject("ADODB.recordSet")
rs.ActiveConnection = Conn
rs.open(Mysql)
Do while rs.eof = false
response.write rs("COUNTRY") ' "COUNTRY" 是countries.mdb中的一个字段
rs.MoveNext
loop
rs.close
conn.close
set rs = nothing
set conn = nothing
我的问题是:
上面的rs是一个对象,却可以像函数一样使用rs("COUNTRY")。但是如何在delphi的ActiveX/OLE Aotomation中实现像rs("COUNTRY")这样的方法呢?请高手指教!!!!