> but the problem is I don't know how can I execute this query in vb.net 2005
> and show the result for user?please help me!
Use the following code to run a query and display data in a grid:
Suppose that the queryBuilder1 is your query builder object, and it
has the SQL property, and the dataGridView1 is your DataGridView
object.
Dim connection As New SqlConnection(connectionString)
Dim command As SqlCommand = connection.CreateCommand()
command.CommandTimeout = 30
command.CommandText = queryBuilder1.SQL
Dim adapter As New SqlDataAdapter(cmd)
Dim dataset As New DataSet()
Try
adapter.Fill(dataset, "QueryResult")
dataGridView1.DataSource = dataset.Tables("QueryResult")
Catch ex As Exception
MessageBox.Show(ex.Message, "SQL error")
End Try
> I have a project in vb.net 2005 and it works with a database in SQL server
> 2005. in this project I prepared a query builder for user like something in
> Access.
BTW, you may have a look at our query building solution, if you
interested in it: http://www.activequerybuilder.com/
Sincerely
Sergey Smagin
Active Database Software
http://www.activedbsoft.com/