Public Sub bind_data()
Dim dltDataSet As DataSet '建立数据源 相当于存储数据的容器
dltDataSet = New DataSet()
Dim dltConn As OleDbConnection = New OleDbConnection() '连接数据库的工具
dltConn.ConnectionString = strCon
dltConn.Open()
Dim dltCommand As OleDbDataAdapter = New OleDbDataAdapter(strcom, dltConn)
dltCommand.Fill(dltDataSet, "dlt") 这里报错:未处理的oledbexception,至少一个参数没有制定参数值 FpSpread2.DataSource = dltDataSet.Tables(0)
dltConn.Close()
End Sub
建立.sln时,我把dlt.accdb数据库拷贝在project以及debug里面的 |
|