Can't use DataTable in vb.net

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I can't use DataTable!
I try to write:

Dim myDataTable As DataTable = New DataTable("ParentTable")

I then get "Type expected" for the DataTable (in Task List)
I have included "Imports System.Data"
(Tried Imports System.DataTable, and other Imports)
I have installed Framework 1.1, but if I look in "About Vb.net" it stands
framework 1.0. I have Visual Basic .net 2002 (ver 7.0 I think).
Is it to old, is there something else I have to do?

Is there an other way to show the user a table with content from xml file!?

Best Regard

-bodil-
 
Bodil,

It can be that you use it in a class and not in a form.
Than you can try

Project->Add reference -> systems.data

Have a look of all kind of samplese about the datatable on our website. By
instance this one.

http://www.windowsformsdatagridhelp.com/default.aspx?ID=65a5ae57-d41c-4144-b9f9-d0e5d6bcb7e2


By the way, better newsgroups for this kind of questions in VBNet are

microsoft.public.dotnet.languages.vb
and
microsoft.public.dotnet.framework.adonet

I hope this helps,

Cor
 
Hi,

Still get the same message: Type expected.
I shall post this question in microsoft.public.dotnet.framework.adonet

Thank you for you help!

Best Regards
Bodil
 
Back
Top