Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Try
- conexion.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data source = C:\temp\Nwind2.MDB"
- conexion.Open()
- Dim line As String = "select distinct p.ProductName,s.CompanyName,c.CategoryName,o.UnitPrice from Products p,Suppliers s,Categories c,OrderDetails o where " _
- & " and p.SupplierID=s.SupplierID and p.CategoryID=c.CategoryID and p.ProductID=o.ProductID "
- Dim comando As New OleDbCommand
- comando.CommandType = CommandType.Text
- comando.CommandText = line
- Me.SaveFileDialog1.InitialDirectory = "C:"
- Me.SaveFileDialog1.Filter = "Text Files (*.txt)|*.txt"
- Me.SaveFileDialog1.ShowDialog()
- Dim sw As New IO.StreamWriter(Me.SaveFileDialog1.FileName)
- Dim sr As OleDbDataReader = comando.ExecuteReader
- sw.WriteLine(line)
- sw.Close()
- Catch ex As Exception
- End Try
Add Comment
Please, Sign In to add comment