我有一个问题。我应该在一些表之间进行连接
sql = "select * from prodotto as p,fornitore as f,categoria as c where
p.codice_fornitore=p.codice and p.codice_categoria=c.codice and p.codice='" & cod.Text & "'"
但是当我可以使用数据适配器填充数据集时,我应该使用哪个名称来引用查询结果。是具有默认名称的临时表吗?
最佳答案
例如,
Private Sub FilldgvMyGrid()
Dim SourceDataSet As New DataSet
Dim adapter As New NpgsqlDataAdapter("select * from prodotto as p,fornitore as
f,categoria as c where p.codice_fornitore=p.codice and p.codice_categoria=c.codice
and p.codice='" & cod.Text & "'", yourSqlConn)
adapter.Fill(SourceDataSet)
/*if you have a Datagridview called dgvMyGrid */
dgvMyGrid.DataSource = SourceDataSet.Tables(0)
End Sub
关于mysql - VB.Net DataSet找不到表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25548280/