i added the database and table by using the "add new data source"
so i can edit the dataset in the dataset designer mode
for putting the expression IIF(Grade >=4, 'Failed', IIF(Grade IN (1,1.25,1.50,1.75,2,2.25,2.50,2.75,3), 'PASSED','UNKNOWN'))
the database and table is made from sql2005
but our professor dont let us using the drag and drop style or add new data source.
unless we combine it by using codes
and this is my code..
Imports System.Data.SqlClient
Public Class testing
Private cs As New SqlConnection("Data Source=JARM\SQLEXPRESS;Initial Catalog=StudentRecordsDatabase;Integrated Security=True")
Private da As New SqlDataAdapter("SELECT * FROM ccsSTUDENTS", cs)
Private ds As New DataSet
Private cmb As New SqlCommandBuilder(da)
Private Sub testing_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
da.Fill(ds, "ccsSTUDENTS")
CcsSTUDENTSDataGridView.DataSource = ds.Tables("ccsSTUDENTS")
the problem is...
when i take off the code
da.Fill(ds, "ccsSTUDENTS")
CcsSTUDENTSDataGridView.DataSource = ds.Tables("ccsSTUDENTS")
the computed column works.
but the datagrid shows no values or records.
----
but when i put the code back
da.Fill(ds, "ccsSTUDENTS")
CcsSTUDENTSDataGridView.DataSource = ds.Tables("ccsSTUDENTS")
it shows the records and values.. but the computed column doesnt work..
i got on error on executing the programming.. no exceptions or warnings..
the computed column does not really works.
this is the last problem for my thesis.. how you can help me sir.. thank you and good day!