[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 209
  • Last Modified:

How to tell whether a column can accept nulls

How can I tell if a column bound to a datatable can accept null values prior to a write to the database
0
bensonwalker
Asked:
bensonwalker
1 Solution
 
Ajay SharmaCommented:
Dim colStatus As Boolean
colStatus = dataset1.datacolumn(0).AllowDBNull

Here the colStatus will be storing a boolean value stating the dbnull is allowed or not.

Here i am evaluating the status of first column (0th column).
Replace your column number in he statment instead of "0" .
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now