'数据库操作
Function DataInsert()
'注意,不要使用:Server.CreateObject
Set adoConn=CreateObject("Adodb.Connection")
adoConn.Open "Provider=MicroSoft.Jet.OLEDB.4.0;Data Source=F:\test.mdb"
strSql="Insert into Fu1011(Price,Bs,Pos) Values('5000','5','5')"
adoConn.Execute(strSql)
adoConn.Close
End Function
多谢
再请问recordset该如何定义?我该如何在自定义函数中执行select查询语句,并获得是否存在查询结果的值呢?
已经解决。
set Rs =CreateObject("Adodb.Recordset")
rs.open "Select * from stock where stockdate='2011-3-5 15:00:00'",Conn,3,2
If RS.recordcount<=0 then
....
else
....
end if