数据库连接是什么方式?以下是oledb连接 Dim TXTSQL As String
Dim da As Data.OleDb.OleDbDataAdapter
Dim ds As Data.DataSet
Dim A1 As DataRowCollectiondim jg(100) as double TXTSQL="select * from tab" da = New OleDb.OleDbDataAdapter(TXTSQL, OleDbConn)
ds = New System.Data.DataSet
da.Fill(ds)
A1 = ds.Tables(0).Rows If A1.Count <> 0 Then dim i as Integer For i = 0 To A1.Count - 1 gj(i)=(A1(i)("价格").ToString) next end if没时间调试,你自己完成至于应付款你应该会了