Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

'dataType' argument cannot be null.

Status
Not open for further replies.

Saturn57

Programmer
Aug 30, 2007
275
CA
I have the following code that is throwing the error ('dataType' argument cannot be null.
Parameter name: dataType)

Code:
Dim dt As New DataTable
dt.TableName = "WorkRelease"
dt.Columns.Add("JobNo", System.Type.GetType("System.Data.SqlTypes.SqlString"))
 
DataTables aren't tied to a specific database or dialect, so the proper syntax is the following
Code:
Dim dt As New DataTable
        dt.TableName = "WorkRelease"
        dt.Columns.Add("JobNo", System.Type.GetType("System.String"))
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top