另外问一下 想列出表中name为(text1里的内容)Adodc2.RecordSource = "select * from storage where name like text1里的内容应该怎么写?
Adodc1.connettionstring="provider=microsoft.jet.oledb.4.0;datasource="+App.path+"\mdb.mdb" Adodc1.CommandType=adCmdTable Adodc1.RecordSource="TableName" Adodc1.Refresh Set DataGrid.Source=Adodc1
"select *from storage where name like '" & Text1.text & "'(注意空格) ----俺是新手
"select *from storage where name like '" & Text1.text & "'(注意空格) ----俺是新手 ==================================== "select *from storage where name like '" & Trim(Text1.text) & "%'"(用上百分号)
还用ADODC啊,太老了,用ADODB吧,用MSFLEXGRID吧,例子如下: dim conn as adodb.connection dim rs as adodb.recordset conn.connectionstring="数据库地址" conn.open sql="select * from 表名 where 条件" rs.open 表名,conn MSFLEXGRID.textmarixt(MSFLEXGRID.row,1)=rs.fileds(0)
想列出表中name为(text1里的内容)Adodc2.RecordSource = "select * from storage where name like text1里的内容应该怎么写?
Adodc1.CommandType=adCmdTable
Adodc1.RecordSource="TableName"
Adodc1.Refresh
Set DataGrid.Source=Adodc1
====================================
"select *from storage where name like '" & Trim(Text1.text) & "%'"(用上百分号)
dim conn as adodb.connection
dim rs as adodb.recordset
conn.connectionstring="数据库地址"
conn.open
sql="select * from 表名 where 条件"
rs.open 表名,conn
MSFLEXGRID.textmarixt(MSFLEXGRID.row,1)=rs.fileds(0)
还用ADODC啊,太老了,用ADODB吧
adodc---adodb~!~!请这位大哥给解述一下吧,ADODC如何个老法呀~!~!晕~!~!
楼主的意思我明白了,你用下面的例子:
dim conn as adodb.connection
dim rs as adodb.recordset
conn.connectionstring="数据库地址"
conn.open
sql="CREATE TABLE 表名
( 字段 属性
.......
)"
RS.EXECUTE(SQL)
rs.open 表名,conn
MSFLEXGRID.textmarixt(MSFLEXGRID.row,1)=rs.fileds(0)
你试试 看行不行??
不行的话,在说