Data TAble declaration Problem
Data TAble declaration Problem
am 23.01.2008 10:24:01 von biju
Hai,
I am very new in ASP.NET. I wnat to use Data Table in my project. For that
When I created an instance variable of data Table like "Dim dtable as
DataTable" I got an error mesage of "Type Expected". I dont know what is
wrong with declaration. So kindly provide solution and thanks in advance
BIJU
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++------------------------- --------
++
RE: Data TAble declaration Problem
am 23.01.2008 21:31:02 von mily242
Hi there,
Add
Imports System.Data
at the top of the class file
regards
--
Milosz
"BIJU" wrote:
> Hai,
> I am very new in ASP.NET. I wnat to use Data Table in my project. For that
> When I created an instance variable of data Table like "Dim dtable as
> DataTable" I got an error mesage of "Type Expected". I dont know what is
> wrong with declaration. So kindly provide solution and thanks in advance
> BIJU
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
RE: Data TAble declaration Problem
am 24.01.2008 13:53:01 von biju
Hai Milosz Skalecki ,
Thanks 4 ur effort
I already imported System.Data namespace. I also impoted system.Data.Sqlclient
So pls give help and thanks in advance
BIJU
"[MCAD]" wrote:
> Hi there,
>
> Add
> Imports System.Data
> at the top of the class file
>
> regards
> --
> Milosz
>
>
> "BIJU" wrote:
>
> > Hai,
> > I am very new in ASP.NET. I wnat to use Data Table in my project. For that
> > When I created an instance variable of data Table like "Dim dtable as
> > DataTable" I got an error mesage of "Type Expected". I dont know what is
> > wrong with declaration. So kindly provide solution and thanks in advance
> > BIJU
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
RE: Data TAble declaration Problem
am 24.01.2008 13:55:01 von biju
Hai Milosz Skalecki ,
Thanks 4 ur effort
I already imported System.Data namespace. I also impoted
system.Data.Sqlclient
So pls give help and thanks in advance
BIJU
"BIJU" wrote:
> Hai Milosz Skalecki ,
> Thanks 4 ur effort
> I already imported System.Data namespace. I also impoted system.Data.Sqlclient
> So pls give help and thanks in advance
> BIJU
> "[MCAD]" wrote:
>
> > Hi there,
> >
> > Add
> > Imports System.Data
> > at the top of the class file
> >
> > regards
> > --
> > Milosz
> >
> >
> > "BIJU" wrote:
> >
> > > Hai,
> > > I am very new in ASP.NET. I wnat to use Data Table in my project. For that
> > > When I created an instance variable of data Table like "Dim dtable as
> > > DataTable" I got an error mesage of "Type Expected". I dont know what is
> > > wrong with declaration. So kindly provide solution and thanks in advance
> > > BIJU
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
RE: Data TAble declaration Problem
am 24.01.2008 19:39:00 von mily242
Show what you've got
--
Milosz
"BIJU" wrote:
> Hai Milosz Skalecki ,
> Thanks 4 ur effort
> I already imported System.Data namespace. I also impoted
> system.Data.Sqlclient
> So pls give help and thanks in advance
> BIJU
>
> "BIJU" wrote:
>
> > Hai Milosz Skalecki ,
> > Thanks 4 ur effort
> > I already imported System.Data namespace. I also impoted system.Data.Sqlclient
> > So pls give help and thanks in advance
> > BIJU
> > "[MCAD]" wrote:
> >
> > > Hi there,
> > >
> > > Add
> > > Imports System.Data
> > > at the top of the class file
> > >
> > > regards
> > > --
> > > Milosz
> > >
> > >
> > > "BIJU" wrote:
> > >
> > > > Hai,
> > > > I am very new in ASP.NET. I wnat to use Data Table in my project. For that
> > > > When I created an instance variable of data Table like "Dim dtable as
> > > > DataTable" I got an error mesage of "Type Expected". I dont know what is
> > > > wrong with declaration. So kindly provide solution and thanks in advance
> > > > BIJU
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
RE: Data TAble declaration Problem
am 25.01.2008 18:08:02 von biju
Hai,
Thanks 4 ur response...
I am still getting error as "Type Expected"
My code is just declaration only
Creating the dataset and data table and data base connection
Data Table declaration has the problem
Dim dtable as DataTable
Kindly give reply and thanks inAdvance
BIJU
"Milosz Skalecki [MCAD]" wrote:
> Show what you've got
> --
> Milosz
>
>
> "BIJU" wrote:
>
> > Hai Milosz Skalecki ,
> > Thanks 4 ur effort
> > I already imported System.Data namespace. I also impoted
> > system.Data.Sqlclient
> > So pls give help and thanks in advance
> > BIJU
> >
> > "BIJU" wrote:
> >
> > > Hai Milosz Skalecki ,
> > > Thanks 4 ur effort
> > > I already imported System.Data namespace. I also impoted system.Data.Sqlclient
> > > So pls give help and thanks in advance
> > > BIJU
> > > "[MCAD]" wrote:
> > >
> > > > Hi there,
> > > >
> > > > Add
> > > > Imports System.Data
> > > > at the top of the class file
> > > >
> > > > regards
> > > > --
> > > > Milosz
> > > >
> > > >
> > > > "BIJU" wrote:
> > > >
> > > > > Hai,
> > > > > I am very new in ASP.NET. I wnat to use Data Table in my project. For that
> > > > > When I created an instance variable of data Table like "Dim dtable as
> > > > > DataTable" I got an error mesage of "Type Expected". I dont know what is
> > > > > wrong with declaration. So kindly provide solution and thanks in advance
> > > > > BIJU
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
RE: Data TAble declaration Problem
am 25.01.2008 19:55:01 von mily242
Howdy,
Please copy entire class declaraton with all the methods you have, don't be
shine :)
--
Milosz
"BIJU" wrote:
> Hai,
> Thanks 4 ur response...
> I am still getting error as "Type Expected"
> My code is just declaration only
> Creating the dataset and data table and data base connection
> Data Table declaration has the problem
> Dim dtable as DataTable
> Kindly give reply and thanks inAdvance
> BIJU
>
> "Milosz Skalecki [MCAD]" wrote:
>
> > Show what you've got
> > --
> > Milosz
> >
> >
> > "BIJU" wrote:
> >
> > > Hai Milosz Skalecki ,
> > > Thanks 4 ur effort
> > > I already imported System.Data namespace. I also impoted
> > > system.Data.Sqlclient
> > > So pls give help and thanks in advance
> > > BIJU
> > >
> > > "BIJU" wrote:
> > >
> > > > Hai Milosz Skalecki ,
> > > > Thanks 4 ur effort
> > > > I already imported System.Data namespace. I also impoted system.Data.Sqlclient
> > > > So pls give help and thanks in advance
> > > > BIJU
> > > > "[MCAD]" wrote:
> > > >
> > > > > Hi there,
> > > > >
> > > > > Add
> > > > > Imports System.Data
> > > > > at the top of the class file
> > > > >
> > > > > regards
> > > > > --
> > > > > Milosz
> > > > >
> > > > >
> > > > > "BIJU" wrote:
> > > > >
> > > > > > Hai,
> > > > > > I am very new in ASP.NET. I wnat to use Data Table in my project. For that
> > > > > > When I created an instance variable of data Table like "Dim dtable as
> > > > > > DataTable" I got an error mesage of "Type Expected". I dont know what is
> > > > > > wrong with declaration. So kindly provide solution and thanks in advance
> > > > > > BIJU
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
RE: Data TAble declaration Problem
am 26.01.2008 09:23:00 von biju
Hello,
Thanks 4 ur response..
I providing here the code for the Datatable
Private Sub Button_add_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim dtable As datatable
Dim dcolum As DataColumn
Dim drow As DataRow
dtable = New datatable("BLOCK")
dcolum = New DataColumn("Product ID", GetType(Int32))
dtable.columns.Add(dcolum)
dcolum = New DataColumn("Product Name", GetType(String))
dtable.columns.Add(dcolum)
dcolum = New DataColumn("Product Category", GetType(String))
dtable.columns.Add(dcolum)
dcolum = New DataColumn("Product Price", GetType(Decimal))
dtable.columns.Add(dcolum)
drow = New DataRow
drow("Product ID") = 23
drow("Product Name") = "Chithra"
drow("Product Category") = "Magazine"
drow("Product Price") = 50
dtable.rows.add(drow)
For Each drow In dtable.rows
For Each dcolum In dtable.columns
Response.Write(drow(dcolum))
Next
Next
End Sub
Kindly give solution and thanks in Advance
"Milosz Skalecki [MCAD]" wrote:
> Howdy,
>
> Please copy entire class declaraton with all the methods you have, don't be
> shine :)
> --
> Milosz
>
>
> "BIJU" wrote:
>
> > Hai,
> > Thanks 4 ur response...
> > I am still getting error as "Type Expected"
> > My code is just declaration only
> > Creating the dataset and data table and data base connection
> > Data Table declaration has the problem
> > Dim dtable as DataTable
> > Kindly give reply and thanks inAdvance
> > BIJU
> >
> > "Milosz Skalecki [MCAD]" wrote:
> >
> > > Show what you've got
> > > --
> > > Milosz
> > >
> > >
> > > "BIJU" wrote:
> > >
> > > > Hai Milosz Skalecki ,
> > > > Thanks 4 ur effort
> > > > I already imported System.Data namespace. I also impoted
> > > > system.Data.Sqlclient
> > > > So pls give help and thanks in advance
> > > > BIJU
> > > >
> > > > "BIJU" wrote:
> > > >
> > > > > Hai Milosz Skalecki ,
> > > > > Thanks 4 ur effort
> > > > > I already imported System.Data namespace. I also impoted system.Data.Sqlclient
> > > > > So pls give help and thanks in advance
> > > > > BIJU
> > > > > "[MCAD]" wrote:
> > > > >
> > > > > > Hi there,
> > > > > >
> > > > > > Add
> > > > > > Imports System.Data
> > > > > > at the top of the class file
> > > > > >
> > > > > > regards
> > > > > > --
> > > > > > Milosz
> > > > > >
> > > > > >
> > > > > > "BIJU" wrote:
> > > > > >
> > > > > > > Hai,
> > > > > > > I am very new in ASP.NET. I wnat to use Data Table in my project. For that
> > > > > > > When I created an instance variable of data Table like "Dim dtable as
> > > > > > > DataTable" I got an error mesage of "Type Expected". I dont know what is
> > > > > > > wrong with declaration. So kindly provide solution and thanks in advance
> > > > > > > BIJU
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
RE: Data TAble declaration Problem
am 26.01.2008 12:31:00 von mily242
This is just a event handler, show entire code from the class file.
--
Milosz
"Milosz Skalecki [MCAD]" wrote:
> Howdy,
>
> Please copy entire class declaraton with all the methods you have, don't be
> shine :)
> --
> Milosz
>
>
> "BIJU" wrote:
>
> > Hai,
> > Thanks 4 ur response...
> > I am still getting error as "Type Expected"
> > My code is just declaration only
> > Creating the dataset and data table and data base connection
> > Data Table declaration has the problem
> > Dim dtable as DataTable
> > Kindly give reply and thanks inAdvance
> > BIJU
> >
> > "Milosz Skalecki [MCAD]" wrote:
> >
> > > Show what you've got
> > > --
> > > Milosz
> > >
> > >
> > > "BIJU" wrote:
> > >
> > > > Hai Milosz Skalecki ,
> > > > Thanks 4 ur effort
> > > > I already imported System.Data namespace. I also impoted
> > > > system.Data.Sqlclient
> > > > So pls give help and thanks in advance
> > > > BIJU
> > > >
> > > > "BIJU" wrote:
> > > >
> > > > > Hai Milosz Skalecki ,
> > > > > Thanks 4 ur effort
> > > > > I already imported System.Data namespace. I also impoted system.Data.Sqlclient
> > > > > So pls give help and thanks in advance
> > > > > BIJU
> > > > > "[MCAD]" wrote:
> > > > >
> > > > > > Hi there,
> > > > > >
> > > > > > Add
> > > > > > Imports System.Data
> > > > > > at the top of the class file
> > > > > >
> > > > > > regards
> > > > > > --
> > > > > > Milosz
> > > > > >
> > > > > >
> > > > > > "BIJU" wrote:
> > > > > >
> > > > > > > Hai,
> > > > > > > I am very new in ASP.NET. I wnat to use Data Table in my project. For that
> > > > > > > When I created an instance variable of data Table like "Dim dtable as
> > > > > > > DataTable" I got an error mesage of "Type Expected". I dont know what is
> > > > > > > wrong with declaration. So kindly provide solution and thanks in advance
> > > > > > > BIJU
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
RE: Data TAble declaration Problem
am 26.01.2008 13:43:01 von biju
Hai
Thanks 4 ur reply
Here is the code of entire class file
Imports System.Data
Imports System.Data.SqlClient
Public Class WebForm1
Inherits System.Web.UI.Page
#Region " Web Form Designer Generated Code "
'This call is required by the Web Form Designer.
Private Sub
InitializeComponent()
End Sub
Protected WithEvents DataGrid1 As System.Web.UI.WebControls.DataGrid
Protected WithEvents DataGrid2 As System.Web.UI.WebControls.DataGrid
Protected WithEvents Button1 As System.Web.UI.WebControls.Button
'NOTE: The following placeholder declaration is required by the Web Form
Designer.
'Do not delete or move it.
Private designerPlaceholderDeclaration As System.Object
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub
#End Region
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim dset As DataSet
Dim con As SqlConnection
Dim adpter As SqlDataAdapter
dset = New DataSet
Dim dcol As DataColumn
con = New SqlConnection("workstation
id=BIJU;UID=sa;PWD=surabhi;packet size=4096;integrated security=false;initial
catalog=election05;persist security info=False")
con.Open()
adpter = New SqlDataAdapter("select * from block_mast where
dist_code = 11 order by b_code", con)
adpter.Fill(dset, "block_mast")
dcol = New DataColumn("NO. of wards", GetType(Decimal))
dcol.Expression = "count(no_wards)"
dset.Tables("block_mast").Columns.Add(dcol)
DataGrid1.DataSource = dset
DataGrid1.DataMember = "Block_mast"
DataGrid1.DataBind()
End Sub
Private Sub Button_add_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim dtable As datatable()
Dim dcolum As DataColumn
Dim drow As DataRow
dtable = New datatable("BLOCK")
dcolum = New DataColumn("Product ID", GetType(Int32))
dtable.columns.Add(dcolum)
dcolum = New DataColumn("Product Name", GetType(String))
dtable.columns.Add(dcolum)
dcolum = New DataColumn("Product Category", GetType(String))
dtable.columns.Add(dcolum)
dcolum = New DataColumn("Product Price", GetType(Decimal))
dtable.columns.Add(dcolum)
drow = New DataRow
drow("Product ID") = 23
drow("Product Name") = "Chithra"
drow("Product Category") = "Magazine"
drow("Product Price") = 50
dtable.rows.add(drow)
For Each drow In dtable.rows
For Each dcolum In dtable.columns
Response.Write(drow(dcolum))
Next
Next
End Sub
End Class
Thanks in advance
"Milosz Skalecki [MCAD]" wrote:
> This is just a event handler, show entire code from the class file.
> --
> Milosz
>
>
> "Milosz Skalecki [MCAD]" wrote:
>
> > Howdy,
> >
> > Please copy entire class declaraton with all the methods you have, don't be
> > shine :)
> > --
> > Milosz
> >
> >
> > "BIJU" wrote:
> >
> > > Hai,
> > > Thanks 4 ur response...
> > > I am still getting error as "Type Expected"
> > > My code is just declaration only
> > > Creating the dataset and data table and data base connection
> > > Data Table declaration has the problem
> > > Dim dtable as DataTable
> > > Kindly give reply and thanks inAdvance
> > > BIJU
> > >
> > > "Milosz Skalecki [MCAD]" wrote:
> > >
> > > > Show what you've got
> > > > --
> > > > Milosz
> > > >
> > > >
> > > > "BIJU" wrote:
> > > >
> > > > > Hai Milosz Skalecki ,
> > > > > Thanks 4 ur effort
> > > > > I already imported System.Data namespace. I also impoted
> > > > > system.Data.Sqlclient
> > > > > So pls give help and thanks in advance
> > > > > BIJU
> > > > >
> > > > > "BIJU" wrote:
> > > > >
> > > > > > Hai Milosz Skalecki ,
> > > > > > Thanks 4 ur effort
> > > > > > I already imported System.Data namespace. I also impoted system.Data.Sqlclient
> > > > > > So pls give help and thanks in advance
> > > > > > BIJU
> > > > > > "[MCAD]" wrote:
> > > > > >
> > > > > > > Hi there,
> > > > > > >
> > > > > > > Add
> > > > > > > Imports System.Data
> > > > > > > at the top of the class file
> > > > > > >
> > > > > > > regards
> > > > > > > --
> > > > > > > Milosz
> > > > > > >
> > > > > > >
> > > > > > > "BIJU" wrote:
> > > > > > >
> > > > > > > > Hai,
> > > > > > > > I am very new in ASP.NET. I wnat to use Data Table in my project. For that
> > > > > > > > When I created an instance variable of data Table like "Dim dtable as
> > > > > > > > DataTable" I got an error mesage of "Type Expected". I dont know what is
> > > > > > > > wrong with declaration. So kindly provide solution and thanks in advance
> > > > > > > > BIJU
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
RE: Data TAble declaration Problem
am 26.01.2008 20:46:00 von mily242
Howdy,
Seems you accidently removed reference to System.Data assembly. Make sure
assembly "System.Data" appears on the list of references (ssems you're
working with ASP.NET 1.1 so it should be visible under the
project->references, if you're using ASP.NET right click on website->property
pages)
Hope this helps
--
Milosz
"BIJU" wrote:
> Hai
> Thanks 4 ur reply
> Here is the code of entire class file
> Imports System.Data
> Imports System.Data.SqlClient
> Public Class WebForm1
> Inherits System.Web.UI.Page
>
> #Region " Web Form Designer Generated Code "
>
> 'This call is required by the Web Form Designer.
> Private Sub
> InitializeComponent()
>
> End Sub
> Protected WithEvents DataGrid1 As System.Web.UI.WebControls.DataGrid
> Protected WithEvents DataGrid2 As System.Web.UI.WebControls.DataGrid
> Protected WithEvents Button1 As System.Web.UI.WebControls.Button
>
> 'NOTE: The following placeholder declaration is required by the Web Form
> Designer.
> 'Do not delete or move it.
> Private designerPlaceholderDeclaration As System.Object
>
> Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles MyBase.Init
> 'CODEGEN: This method call is required by the Web Form Designer
> 'Do not modify it using the code editor.
> InitializeComponent()
> End Sub
>
> #End Region
> Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles MyBase.Load
> Dim dset As DataSet
> Dim con As SqlConnection
> Dim adpter As SqlDataAdapter
> dset = New DataSet
> Dim dcol As DataColumn
> con = New SqlConnection("workstation
> id=BIJU;UID=sa;PWD=surabhi;packet size=4096;integrated security=false;initial
> catalog=election05;persist security info=False")
> con.Open()
> adpter = New SqlDataAdapter("select * from block_mast where
> dist_code = 11 order by b_code", con)
> adpter.Fill(dset, "block_mast")
> dcol = New DataColumn("NO. of wards", GetType(Decimal))
> dcol.Expression = "count(no_wards)"
> dset.Tables("block_mast").Columns.Add(dcol)
> DataGrid1.DataSource = dset
> DataGrid1.DataMember = "Block_mast"
> DataGrid1.DataBind()
> End Sub
>
> Private Sub Button_add_Click(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles Button1.Click
> Dim dtable As datatable()
> Dim dcolum As DataColumn
> Dim drow As DataRow
> dtable = New datatable("BLOCK")
> dcolum = New DataColumn("Product ID", GetType(Int32))
> dtable.columns.Add(dcolum)
> dcolum = New DataColumn("Product Name", GetType(String))
> dtable.columns.Add(dcolum)
> dcolum = New DataColumn("Product Category", GetType(String))
> dtable.columns.Add(dcolum)
> dcolum = New DataColumn("Product Price", GetType(Decimal))
> dtable.columns.Add(dcolum)
>
> drow = New DataRow
> drow("Product ID") = 23
> drow("Product Name") = "Chithra"
> drow("Product Category") = "Magazine"
> drow("Product Price") = 50
> dtable.rows.add(drow)
>
> For Each drow In dtable.rows
> For Each dcolum In dtable.columns
> Response.Write(drow(dcolum))
> Next
> Next
> End Sub
> End Class
>
> Thanks in advance
> "Milosz Skalecki [MCAD]" wrote:
>
> > This is just a event handler, show entire code from the class file.
> > --
> > Milosz
> >
> >
> > "Milosz Skalecki [MCAD]" wrote:
> >
> > > Howdy,
> > >
> > > Please copy entire class declaraton with all the methods you have, don't be
> > > shine :)
> > > --
> > > Milosz
> > >
> > >
> > > "BIJU" wrote:
> > >
> > > > Hai,
> > > > Thanks 4 ur response...
> > > > I am still getting error as "Type Expected"
> > > > My code is just declaration only
> > > > Creating the dataset and data table and data base connection
> > > > Data Table declaration has the problem
> > > > Dim dtable as DataTable
> > > > Kindly give reply and thanks inAdvance
> > > > BIJU
> > > >
> > > > "Milosz Skalecki [MCAD]" wrote:
> > > >
> > > > > Show what you've got
> > > > > --
> > > > > Milosz
> > > > >
> > > > >
> > > > > "BIJU" wrote:
> > > > >
> > > > > > Hai Milosz Skalecki ,
> > > > > > Thanks 4 ur effort
> > > > > > I already imported System.Data namespace. I also impoted
> > > > > > system.Data.Sqlclient
> > > > > > So pls give help and thanks in advance
> > > > > > BIJU
> > > > > >
> > > > > > "BIJU" wrote:
> > > > > >
> > > > > > > Hai Milosz Skalecki ,
> > > > > > > Thanks 4 ur effort
> > > > > > > I already imported System.Data namespace. I also impoted system.Data.Sqlclient
> > > > > > > So pls give help and thanks in advance
> > > > > > > BIJU
> > > > > > > "[MCAD]" wrote:
> > > > > > >
> > > > > > > > Hi there,
> > > > > > > >
> > > > > > > > Add
> > > > > > > > Imports System.Data
> > > > > > > > at the top of the class file
> > > > > > > >
> > > > > > > > regards
> > > > > > > > --
> > > > > > > > Milosz
> > > > > > > >
> > > > > > > >
> > > > > > > > "BIJU" wrote:
> > > > > > > >
> > > > > > > > > Hai,
> > > > > > > > > I am very new in ASP.NET. I wnat to use Data Table in my project. For that
> > > > > > > > > When I created an instance variable of data Table like "Dim dtable as
> > > > > > > > > DataTable" I got an error mesage of "Type Expected". I dont know what is
> > > > > > > > > wrong with declaration. So kindly provide solution and thanks in advance
> > > > > > > > > BIJU
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >