no it is actually like this i have a table called pending in that i have a row called balance amount.i want to list from that table having balance amount greater than zero and i want to list it in datagrid view
this is my code
provider = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source ="
dataFile = "D:\gulf work\gulfdata.mdb" ' Change it to your Access Database location
connString = provider & dataFile
myConnection.ConnectionString = connString
Dim str As String
str = "SELECT * FROM pending WHERE balance > 0"
Dim cmd As OleDbCommand = New OleDbCommand(str, myConnection)
dr = cmd.ExecuteReader
DataGridView1.DataSource = dr.Read()
Sorry, I did reply before you posted your code so I have removed that statement.
Looking at the code that you have posted you are using a DataReader to bind to the DataGridView. This is not correct. A DataReader is used as a means to read data in a forward only fashion, not as a collection of data. Instead, use a DataTable or DataSet (which is a collection of DataTables).
Using adapter As New OleDbDataAdapter(str, connString)
Dim table As New DataTable
'Bind the Table to the DataSource of the DataGridView
DataGridView1.DataSource = table
Write a C program that should create a 10 element array of random integers (0 to 9). The program should total all of the numbers in the odd positions of the array and compare them with the total of the numbers in the even positions of the array and indicate ...
I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...