选择使用where和不同的表

时间:2014-06-23 10:41:17

标签: mysql vb.net select oledb where-clause

我有这段代码:

Dim Oledbcon1 As New OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Users\Utilizador.Utilizador-PC\Documents\Visual Studio 2013\Projects\WindowsApplication1\WindowsApplication1\Doc_Vendas_Cab.mdb;Persist Security Info=True")
Oledbcon1.Open()
Dim oledbstr1 As String = "Select Mov_Venda_Lin.ftlQuantidade, Mov_Venda_Lin.fltPrecoUnitario, Tbl_Gce_ArtigosPrecos.strCodArtigo,Tbl_Gce_ArtigosPrecos.intNumero,Tbl_Gce_Vendedores.strNome " & _
                "From Mov_Venda_Lin,Tbl_Gce_ArtigosPrecos,Tbl_Gce_Vendedores, Mov_Venda_Cab " & _
                "where (Mov_Venda_Lin.strCodArtigo = Tbl_Gce_ArtigosPrecos.strCodArtigo) and (Mov_Venda_Lin.StrCodSeccao = Mov_Venda_Cab.StrCodSeccao) and (Mov_Venda_Lin.intNumero = Mov_Venda_Cab.intNumero) and (Mov_Venda_Cab.IntCodVendedor = Tbl_Gce_Vendedores.IntCodigo);"
Dim OledbConComm1 As New OleDb.OleDbCommand(oledbstr1, Oledbcon1)
Dim olebddr As OleDb.OleDbDataReader = OledbConComm1.ExecuteReader
Oledbcon1.Open()

我想选择并关联这些数据,但它不起作用这是错误:

未处理的类型' System.Data.OleDb.OleDbException'发生在System.Data.dll

附加信息:没有给出一个或多个必需参数的值。

有人能帮助我吗?提前谢谢。

0 个答案:

没有答案