- Private Sub search_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
- Form1.sqlcont.Open()
- Dim sqlstr As String = "select mf_pic,mf_prd_no,mf_dd,mf_cus,mf_rem,usd,mf_ll,l,w,h,pic,mf_amt1,mf_amt2,mf_amt3,mf_amt4,mf_amt_net1,mf_amt_net2,mf_amt_net3,mf_amt_net4 from mf"
- Dim dataapt As New OleDb.OleDbDataAdapter(sqlstr, Form1.sqlcont)
- Dim dataset As New DataSet
- dataapt.Fill(dataset, "mf")
- Grid1.DataSource = dataset
- Grid1.DataMember = "mf"
- dataset.Dispose()
- dataapt.Dispose()
- Form1.sqlcont.Close()
- End Sub
复制代码
这个表中只有一行数据,换用datagridview不存在这个问题,所以应该是spread初始化时影响了打开速度
因为第二次打开时就很快 |