Home > Database > Creating DataTable in Memory

Creating DataTable in Memory

Dim dtDataTable As DataTable = Nothing
Dim dtRow As DataRow

dtDataTable.Columns.Add("LastName", GetType(String))
dtDataTable.Columns.Add("FirstName", GetType(String))
dtDataTable.Columns.Add("Age", GetType(Integer))

dtRow= dtDataTable.NewRow()
dtRow.Item("LastName") = "Smith"
dtRow.Item("FirstName") = "John"
dtRow.Item("Age") = 25

Categories: Database Tags:
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: