# Re: About database

Posted by 尧哥 on September 06, 1998 at 22:06:52:

In Reply to: About database posted by 初学者 on September 04, 1998 at 01:40:14:

dim DB AS database
dim rs as recordset
dim path as string
set db=openrecordset(dbpath)
set rs=db.openrecordset(name)
set data1.recordset=rs
请在form上布置 data 物件及dbgrid物件
以上 dbpath 是资料库的路径,name 是资料表的名称
如此database的资料表可在 DBGRID 上现

也可在布置DATA元件后,设定DATA元件的DATABASENAME(DATABASE),再设定RECORDSOURCE(资料表),再把DBGRID的DATASOURE设定成DATA即可

Follow Ups: