1在BDE中建立数据库别名或在ODBC中建立(使用ADO可略过)
2在FORM上放Query1和Database1附datasource1和dbgrid1
ADO放置ADOConnection1和ADOQuery1附datasource1和dbgrid1
3设置database1中aliasname和databasename附datasource.dataset和dbgrid1.datasource
ADO设置ADOConnection1.connectionstring和connected附datasource.dataset和dbgrid1.datasource
4加入脚本程序:query1.sql.text:='select * from yourtable';
query1.open;