PC Review


Reply
Thread Tools Rate Thread

Data TAble declaration Problem

 
 
BIJU
Guest
Posts: n/a
 
      23rd Jan 2008
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










































































































































































































































































































































































































































































+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------------------------
++
 
Reply With Quote
 
 
 
 
Milosz Skalecki [MCAD]
Guest
Posts: n/a
 
      23rd Jan 2008
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
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

 
Reply With Quote
 
BIJU
Guest
Posts: n/a
 
      24th Jan 2008
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
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >

 
Reply With Quote
 
Milosz Skalecki [MCAD]
Guest
Posts: n/a
 
      24th Jan 2008
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
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >

 
Reply With Quote
 
BIJU
Guest
Posts: n/a
 
      25th Jan 2008
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
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >

 
Reply With Quote
 
Milosz Skalecki [MCAD]
Guest
Posts: n/a
 
      25th Jan 2008
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
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >

 
Reply With Quote
 
BIJU
Guest
Posts: n/a
 
      26th Jan 2008
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
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >

 
Reply With Quote
 
Milosz Skalecki [MCAD]
Guest
Posts: n/a
 
      26th Jan 2008
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
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >

 
Reply With Quote
 
BIJU
Guest
Posts: n/a
 
      26th Jan 2008
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.
<System.Diagnostics.DebuggerStepThrough()> 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
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >

 
Reply With Quote
 
Milosz Skalecki [MCAD]
Guest
Posts: n/a
 
      26th Jan 2008
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.
> <System.Diagnostics.DebuggerStepThrough()> 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
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Data Type Declaration R Tanner Microsoft Excel Programming 6 19th Jun 2008 12:34 AM
Use of Public for data declaration in Excel 2000 Gandalph Microsoft Excel Programming 1 17th Apr 2008 06:47 PM
Data Type Declaration =?Utf-8?B?TyBXaWxzb24=?= Microsoft Access 5 12th Mar 2006 05:27 AM
c# data type declaration ditwal001 Microsoft C# .NET 5 20th Nov 2003 10:44 PM
Declaration problem Soske Microsoft VB .NET 1 5th Sep 2003 02:06 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:27 AM.