vb.net query to display specific rows of datatable [basic]

后端 未结 1 1054
情书的邮戳
情书的邮戳 2021-01-16 05:59

How do I display the specific rows returned by the query in a Table Query code is

SELECT name, STD, Fees, paid
FROM  register
WHERE (paid - Fees &l         


        
相关标签:
1条回答
  • 2021-01-16 06:58

    Make the query by selecting all the columns in the table. If you omit the columns in the query data TableAdapter populates null.

    SELECT student_id, name, contact_number, address, STD, FEES, Duration, image_lotacion, (....) 
    FROM  register WHERE (paid - Fees < 0)
    

    Another option is to allow the DataTable accepts null values and no error. In the properties of each column in the DataTable, set the AllowDBNull property to True, and the property NullValue Empty or 0 if it is a numeric or Boolean value. You should also remove the primary key and allow the column is zero, because if not include in the office, also will give error.

    0 讨论(0)
提交回复
热议问题