hassanintern
New member
- Joined
- Jun 4, 2013
- Messages
- 4
- Programming Experience
- Beginner
Hi,
I am populating datagridview with a table which is designed in sql express server 2008.
it is populating but i want to filter out some rows which have IsDeleted Column = True?
how can i do that? if anyone can add a line or 2 in below code to do that, it will be great.
IsDeleted is one of the column of boolean type in the Document Table which is in DocumentManager Database.
the code is:
I am populating datagridview with a table which is designed in sql express server 2008.
it is populating but i want to filter out some rows which have IsDeleted Column = True?
how can i do that? if anyone can add a line or 2 in below code to do that, it will be great.
IsDeleted is one of the column of boolean type in the Document Table which is in DocumentManager Database.
the code is:
Imports System.Data.SqlClient Public Class Form1 Dim adapter As New SqlDataAdapter() Dim ds As New DataSet() Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load Dim conn As New SqlConnection("Data Source=Hassan-PC\SQLEXPRESS2008;Initial Catalog=DocumentManager;Integrated Security=True") Dim cmd As SqlCommand = conn.CreateCommand() cmd.CommandText = "SELECT DocumentTitle FROM Document" adapter.SelectCommand = cmd conn.Open() adapter.Fill(ds, "Document") conn.Close() DataGridView1.DataSource = ds DataGridView1.DataMember = "Document" End Sub End Class
Last edited by a moderator: