Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx_beginners thread: compiling business object gives me errors - why?


Message #1 by gainesme72@a... on Thu, 19 Sep 2002 08:23:30
I get the following error when compiling my business object. What could 
be wrong? thanks

C:\Inetpub\wwwroot\bin>vbc /debug /nologo /t:library /out:SimpleVBBO.dll 
SimpleVBBO.vb /r:system.dll /r:system.data.dll  
C:\Inetpub\wwwroot\bin\SimpleVBBO.vb(30) : error BC30002: 
Type 'SQLConnection' is not defined.

    public Function makeSQLConnection as SQLConnection
                                         ~~~~~~~~~~~~~
C:\Inetpub\wwwroot\bin\SimpleVBBO.vb(31) : error BC30002: 
Type 'SQLConnection' is not defined.

     dim oSQLConn as new SQLConnection(msConnectionString)
                         ~~~~~~~~~~~~~                    
C:\Inetpub\wwwroot\bin\SimpleVBBO.vb(36) : error BC30002: 
Type 'SQLDataSetCommand' is not defined.

     dim oCmd as new SQLDataSetCommand(msSqlStatement, makeSQLConnection)
                     ~~~~~~~~~~~~~~~~~                                   
C:\Inetpub\wwwroot\bin\SimpleVBBO.vb(37) : error BC30009: Reference 
required to assembly 'System.Xml' containing the implemented 
interface 'System.Xml.Serialization.IXmlSerializable'. Add one to your 
project.

     dim oDS as new DataSet
                    ~~~~~~~
Message #2 by gainesme72@a... on Thu, 19 Sep 2002 08:31:35
Here is the code:


Imports System
Imports System.Data
Imports System.Data.SqlClient.SqlConnection

namespace SimpleVBBO
   public class SQLRecords

    public msConnectionString as String
    public msSqlStatement as String

    public Property SQLConnectionString as String
     set
      msConnectionString = value
     end set
     get
      return msConnectionString 
     end get
    end Property

    public Property SQLStatement as String
     set
      msSqlStatement = value
     end set
     get
      return msSqlStatement 
     end get
    end Property

    public Function makeSQLConnection as SQLConnection
     dim oSQLConn as new SQLConnection(msConnectionString)
     return oSQLConn
    end Function

    public Function GetRecords as DataView
     dim oCmd as new SQLDataSetCommand(msSqlStatement, makeSQLConnection)
     dim oDS as new DataSet
     oCmd.FillDataSet(oDS,"RETURNDATASET")
     return oDS.Tables(0).DefaultView
    end Function
   end class
end namespace


> I get the following error when compiling my business object. What could 
b> e wrong? thanks

> 
C:\Inetpub\wwwroot\bin>vbc /debug /nologo /t:library /out:SimpleVBBO.dll 
S> impleVBBO.vb /r:system.dll /r:system.data.dll  
C> :\Inetpub\wwwroot\bin\SimpleVBBO.vb(30) : error BC30002: 
T> ype 'SQLConnection' is not defined.

>     public Function makeSQLConnection as SQLConnection
 >                                         ~~~~~~~~~~~~~
C> :\Inetpub\wwwroot\bin\SimpleVBBO.vb(31) : error BC30002: 
T> ype 'SQLConnection' is not defined.

>      dim oSQLConn as new SQLConnection(msConnectionString)
 >                         ~~~~~~~~~~~~~                    
C> :\Inetpub\wwwroot\bin\SimpleVBBO.vb(36) : error BC30002: 
T> ype 'SQLDataSetCommand' is not defined.

>      dim oCmd as new SQLDataSetCommand(msSqlStatement, 
makeSQLConnection)
 >                     
~~~~~~~~~~~~~~~~~                                   
C> :\Inetpub\wwwroot\bin\SimpleVBBO.vb(37) : error BC30009: Reference 
r> equired to assembly 'System.Xml' containing the implemented 
i> nterface 'System.Xml.Serialization.IXmlSerializable'. Add one to your 
p> roject.

>      dim oDS as new DataSet
 >                    ~~~~~~~
Message #3 by Imar@S... on Thu, 19 Sep 2002 09:03:36
Hi there,

You shouldn't include class information in your Imports statement. Change:

    Imports System.Data.SqlClient.SqlConnection

to

    Imports System.Data.SqlClient


HtH

Imar



> Here is the code:

> 
I> mports System
I> mports System.Data
I> mports System.Data.SqlClient.SqlConnection

> namespace SimpleVBBO
 >   public class SQLRecords

>     public msConnectionString as String
 >    public msSqlStatement as String

>     public Property SQLConnectionString as String
 >     set
 >      msConnectionString = value
 >     end set
 >     get
 >      return msConnectionString 
 >     end get
 >    end Property

>     public Property SQLStatement as String
 >     set
 >      msSqlStatement = value
 >     end set
 >     get
 >      return msSqlStatement 
 >     end get
 >    end Property

>     public Function makeSQLConnection as SQLConnection
 >     dim oSQLConn as new SQLConnection(msConnectionString)
 >     return oSQLConn
 >    end Function

>     public Function GetRecords as DataView
 >     dim oCmd as new SQLDataSetCommand(msSqlStatement, makeSQLConnection)
 >     dim oDS as new DataSet
 >     oCmd.FillDataSet(oDS,"RETURNDATASET")
 >     return oDS.Tables(0).DefaultView
 >    end Function
 >   end class
e> nd namespace
Message #4 by gainesme72@a... on Thu, 19 Sep 2002 15:06:17
Thanks, I just removed that and this is what I got in return when 
compiling.


C:\Inetpub\wwwroot\bin>vbc /debug /nologo /t:library /out:SimpleVBBO.dll 
SimpleVBBO.vb /r:system.dll /r:system.data.dll  
C:\Inetpub\wwwroot\bin\SimpleVBBO.vb(35) : error BC30002: 
Type 'SQLDataSetCommand' is not defined.

     dim oCmd as new SQLDataSetCommand(msSqlStatement, makeSQLConnection)
                     ~~~~~~~~~~~~~~~~~                                   
C:\Inetpub\wwwroot\bin\SimpleVBBO.vb(36) : error BC30009: Reference 
required to assembly 'System.Xml' containing the implemented 
interface 'System.Xml.Serialization.IXmlSerializable'. Add one to your 
project.

     dim oDS as new DataSet
                    ~~~~~~~


> Hi there,

> You shouldn't include class information in your Imports statement. 
Change:

>     Imports System.Data.SqlClient.SqlConnection

> to

>     Imports System.Data.SqlClient

> 
H> tH

> Imar

> 

> > Here is the code:

> > 
I> > mports System
I> > mports System.Data
I> > mports System.Data.SqlClient.SqlConnection

> > namespace SimpleVBBO
 > >   public class SQLRecords

> >     public msConnectionString as String
 > >    public msSqlStatement as String

> >     public Property SQLConnectionString as String
 > >     set
 > >      msConnectionString = value
 > >     end set
 > >     get
 > >      return msConnectionString 
 > >     end get
 > >    end Property

> >     public Property SQLStatement as String
 > >     set
 > >      msSqlStatement = value
 > >     end set
 > >     get
 > >      return msSqlStatement 
 > >     end get
 > >    end Property

> >     public Function makeSQLConnection as SQLConnection
 > >     dim oSQLConn as new SQLConnection(msConnectionString)
 > >     return oSQLConn
 > >    end Function

> >     public Function GetRecords as DataView
 > >     dim oCmd as new SQLDataSetCommand(msSqlStatement, 
makeSQLConnection)
 > >     dim oDS as new DataSet
 > >     oCmd.FillDataSet(oDS,"RETURNDATASET")
 > >     return oDS.Tables(0).DefaultView
 > >    end Function
 > >   end class
e> > nd namespace
Message #5 by Imar Spaanjaars <Imar@S...> on Thu, 19 Sep 2002 16:05:12 +0200
Hmmm, I wonder what those error message are used for..... ;-)

Somehow, I think that this should give you a hint....:

         Reference required to assembly 'System.Xml' containing the 
implemented
         interface 'System.Xml.Serialization.IXmlSerializable'. Add one to 
your
         project.

Anyway, what version of .NET are you using? AFAIK, SQLDataSetCommand is old 
stuff from earlier betas. Has been renamed to SqlDataAdapter.

Are you using a beta, or just an outdated book / website / article etc??


Imar
'



At 03:06 PM 9/19/2002 +0000, you wrote:
>Thanks, I just removed that and this is what I got in return when
>compiling.
>
>
>C:\Inetpub\wwwroot\bin>vbc /debug /nologo /t:library /out:SimpleVBBO.dll
>SimpleVBBO.vb /r:system.dll /r:system.data.dll
>C:\Inetpub\wwwroot\bin\SimpleVBBO.vb(35) : error BC30002:
>Type 'SQLDataSetCommand' is not defined.
>
>      dim oCmd as new SQLDataSetCommand(msSqlStatement, makeSQLConnection)
>                      ~~~~~~~~~~~~~~~~~
>C:\Inetpub\wwwroot\bin\SimpleVBBO.vb(36) : error BC30009: Reference
>required to assembly 'System.Xml' containing the implemented
>interface 'System.Xml.Serialization.IXmlSerializable'. Add one to your
>project.
>
>      dim oDS as new DataSet
>                     ~~~~~~~


Message #6 by gainesme72@a... on Thu, 19 Sep 2002 15:33:24
This is an example that I pulled from a website. I know, I should add 
this class as part of my Imports statement, but I did that and got 
errors. Why would it need anything to do with an Xml class?

C:\WINDOWS\Microsoft.NET\Framework\v1.0.3705

'System.Xml.Serialization.IXmlSerializable'


> Hmmm, I wonder what those error message are used for..... ;-)

Somehow, I think that this should give you a hint....:

         Reference required to assembly 'System.Xml' containing the 
implemented
         interface 'System.Xml.Serialization.IXmlSerializable'. Add one 
to 
your
         project.

Anyway, what version of .NET are you using? AFAIK, SQLDataSetCommand is 
old 
stuff from earlier betas. Has been renamed to SqlDataAdapter.

Are you using a beta, or just an outdated book / website / article etc??


Imar
'



At 03:06 PM 9/19/2002 +0000, you wrote:
>Thanks, I just removed that and this is what I got in return when
>compiling.
>
>
>C:\Inetpub\wwwroot\bin>vbc /debug /nologo /t:library /out:SimpleVBBO.dll
>SimpleVBBO.vb /r:system.dll /r:system.data.dll
>C:\Inetpub\wwwroot\bin\SimpleVBBO.vb(35) : error BC30002:
>Type 'SQLDataSetCommand' is not defined.
>
>      dim oCmd as new SQLDataSetCommand(msSqlStatement, 
makeSQLConnection)
>                      ~~~~~~~~~~~~~~~~~
>C:\Inetpub\wwwroot\bin\SimpleVBBO.vb(36) : error BC30009: Reference
>required to assembly 'System.Xml' containing the implemented
>interface 'System.Xml.Serialization.IXmlSerializable'. Add one to your
>project.
>
>      dim oDS as new DataSet
>                     ~~~~~~~


Message #7 by gainesme72@a... on Thu, 19 Sep 2002 15:35:44
With the code base above, would there be a better way to do this? thanks


> This is an example that I pulled from a website. I know, I should add 
t> his class as part of my Imports statement, but I did that and got 
e> rrors. Why would it need anything to do with an Xml class?

> C:\WINDOWS\Microsoft.NET\Framework\v1.0.3705

> 'System.Xml.Serialization.IXmlSerializable'

> 
>>  Hmmm, I wonder what those error message are used for..... ;-)

> Somehow, I think that this should give you a hint....:

>          Reference required to assembly 'System.Xml' containing the 
i> mplemented
 >         interface 'System.Xml.Serialization.IXmlSerializable'. Add one 
t> o 
y> our
 >         project.

> Anyway, what version of .NET are you using? AFAIK, SQLDataSetCommand is 
o> ld 
s> tuff from earlier betas. Has been renamed to SqlDataAdapter.

> Are you using a beta, or just an outdated book / website / article etc??

> 
I> mar
'> 

> 

> At 03:06 PM 9/19/2002 +0000, you wrote:
>> Thanks, I just removed that and this is what I got in return when
>> compiling.
>> 
>> 
>> 
C:\Inetpub\wwwroot\bin>vbc /debug /nologo /t:library /out:SimpleVBBO.dll
>> SimpleVBBO.vb /r:system.dll /r:system.data.dll
>> C:\Inetpub\wwwroot\bin\SimpleVBBO.vb(35) : error BC30002:
>> Type 'SQLDataSetCommand' is not defined.
>> 
>>       dim oCmd as new SQLDataSetCommand(msSqlStatement, 
m> akeSQLConnection)
>>                       ~~~~~~~~~~~~~~~~~
>> C:\Inetpub\wwwroot\bin\SimpleVBBO.vb(36) : error BC30009: Reference
>> required to assembly 'System.Xml' containing the implemented
>> interface 'System.Xml.Serialization.IXmlSerializable'. Add one to your
>> project.
>> 
>>       dim oDS as new DataSet
>>                      ~~~~~~~

> 
Message #8 by gainesme72@a... on Thu, 19 Sep 2002 15:38:18
This is the error message when I added "Imports 
System.Xml.Serialization.IXmlSerializable" to the top of my page.


C:\Inetpub\wwwroot\bin>vbc /debug /nologo /t:library /out:SimpleVBBO.dll 
SimpleVBBO.vb /r:system.dll /r:system.data.dll  
C:\Inetpub\wwwroot\bin\SimpleVBBO.vb(35) : error BC30002: 
Type 'SQLDataSetCommand' is not defined.

     dim oCmd as new SQLDataSetCommand(msSqlStatement, makeSQLConnection)
                     ~~~~~~~~~~~~~~~~~                                   
C:\Inetpub\wwwroot\bin\SimpleVBBO.vb(36) : error BC30009: Reference 
required to assembly 'System.Xml' containing the implemented 
interface 'System.Xml.Serialization.IXmlSerializable'. Add one to your 
project.

     dim oDS as new DataSet
                    ~~~~~~~
Message #9 by Imar Spaanjaars <Imar@S...> on Thu, 19 Sep 2002 16:38:58 +0200
It looks like you're running beta stuff on the final release of .NET

Change SQLDataSetCommand  to SqlDataAdapter and try again.......
Or post some of your code and .NET specs (version etc)



Imar


At 03:33 PM 9/19/2002 +0000, you wrote:
>This is an example that I pulled from a website. I know, I should add
>this class as part of my Imports statement, but I did that and got
>errors. Why would it need anything to do with an Xml class?
>
>C:\WINDOWS\Microsoft.NET\Framework\v1.0.3705
>
>'System.Xml.Serialization.IXmlSerializable'
>
>
> > Hmmm, I wonder what those error message are used for..... ;-)
>
>Somehow, I think that this should give you a hint....:
>
>          Reference required to assembly 'System.Xml' containing the
>implemented
>          interface 'System.Xml.Serialization.IXmlSerializable'. Add one
>to
>your
>          project.
>
>Anyway, what version of .NET are you using? AFAIK, SQLDataSetCommand is
>old
>stuff from earlier betas. Has been renamed to SqlDataAdapter.
>
>Are you using a beta, or just an outdated book / website / article etc??
>
>
>Imar
>'


Message #10 by gainesme72@a... on Thu, 19 Sep 2002 15:54:48
That did not work to Change SQLDataSetCommand  to SqlDataAdapter. Where 
can I get my specs on the version of .NET i am running.

> It looks like you're running beta stuff on the final release of .NET

Change SQLDataSetCommand  to SqlDataAdapter and try again.......
Or post some of your code and .NET specs (version etc)



Imar


At 03:33 PM 9/19/2002 +0000, you wrote:
>This is an example that I pulled from a website. I know, I should add
>this class as part of my Imports statement, but I did that and got
>errors. Why would it need anything to do with an Xml class?
>
>C:\WINDOWS\Microsoft.NET\Framework\v1.0.3705
>
>'System.Xml.Serialization.IXmlSerializable'
>
>
> > Hmmm, I wonder what those error message are used for..... ;-)
>
>Somehow, I think that this should give you a hint....:
>
>          Reference required to assembly 'System.Xml' containing the
>implemented
>          interface 'System.Xml.Serialization.IXmlSerializable'. Add one
>to
>your
>          project.
>
>Anyway, what version of .NET are you using? AFAIK, SQLDataSetCommand is
>old
>stuff from earlier betas. Has been renamed to SqlDataAdapter.
>
>Are you using a beta, or just an outdated book / website / article etc??
>
>
>Imar
>'


Message #11 by Imar Spaanjaars <Imar@S...> on Thu, 19 Sep 2002 17:54:46 +0200
Go to

C:\WINDOWS\Microsoft.NET\Framework\

There should be a v* folder. What's the number??

And can you specify "That did not work"? What went wrong, what error message??

Imar






At 03:54 PM 9/19/2002 +0000, you wrote:
>That did not work to Change SQLDataSetCommand  to SqlDataAdapter. Where
>can I get my specs on the version of .NET i am running.
>
> > It looks like you're running beta stuff on the final release of .NET
>
>Change SQLDataSetCommand  to SqlDataAdapter and try again.......
>Or post some of your code and .NET specs (version etc)
>
>
>
>Imar
>
>
>At 03:33 PM 9/19/2002 +0000, you wrote:
> >This is an example that I pulled from a website. I know, I should add
> >this class as part of my Imports statement, but I did that and got
> >errors. Why would it need anything to do with an Xml class?
> >
> >C:\WINDOWS\Microsoft.NET\Framework\v1.0.3705
> >
> >'System.Xml.Serialization.IXmlSerializable'
> >
> >
> > > Hmmm, I wonder what those error message are used for..... ;-)
> >
> >Somehow, I think that this should give you a hint....:
> >
> >          Reference required to assembly 'System.Xml' containing the
> >implemented
> >          interface 'System.Xml.Serialization.IXmlSerializable'. Add one
> >to
> >your
> >          project.
> >
> >Anyway, what version of .NET are you using? AFAIK, SQLDataSetCommand is
> >old
> >stuff from earlier betas. Has been renamed to SqlDataAdapter.
> >
> >Are you using a beta, or just an outdated book / website / article etc??
> >
> >
> >Imar
> >'
>
>
>---
>Beginning ASP.NET Databases using VB.NET
>http://www.wrox.com/ACON11.asp?ISBN=1861006195
>
>Beginning ASP.NET Databases using C#
>http://www.wrox.com/ACON11.asp?ISBN=1861007418
>
>These books look at how we can create data-centric ASP.NET
>applications. Requiring some basic knowledge of ASP.NET,
>Access and SQL the authors guide you through the process
>of connecting and consuming information in a variety of
>ways. They are packed full of excellent illustrative code
>examples, demonstrating important fundamental principles.


Message #12 by gainesme72@a... on Thu, 19 Sep 2002 17:31:29
Also, is there a better way?

My version is v1.0.3705

and the error I got is:


C:\Inetpub\wwwroot\bin>vbc /debug /nologo /t:library /out:SimpleVBBO.dll 
SimpleVBBO.vb /r:system.dll /r:system.data.dll  
C:\Inetpub\wwwroot\bin\SimpleVBBO.vb(4) : error BC30466: Namespace or 
type 'IXmlSerializable' for the 
Imports 'System.Xml.Serialization.IXmlSerializable' cannot be found.

Imports System.Xml.Serialization.IXmlSerializable
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Inetpub\wwwroot\bin\SimpleVBBO.vb(37) : error BC30009: Reference 
required to assembly 'System.Xml' containing the implemented 
interface 'System.Xml.Serialization.IXmlSerializable'. Add one to your 
project.

     dim oDS as new DataSet
                    ~~~~~~~
C:\Inetpub\wwwroot\bin\SimpleVBBO.vb(38) : error BC30456: 'FillDataSet' 
is not a member of 'System.Data.SqlClient.SqlDataAdapter'.

     oCmd.FillDataSet(oDS,"RETURNDATASET")
     ~~~~~~~~~~~~~~~~                     


------------------------------------------
executing


Imports System
Imports System.Data
Imports System.Data.SqlClient
Imports System.Xml.Serialization.IXmlSerializable

namespace SimpleVBBO
   public class SQLRecords

    private msConnectionString as String
    private msSqlStatement as String

    public Property SQLConnectionString as String
     set
      msConnectionString = value
     end set
     get
      return msConnectionString 
     end get
    end Property

    public Property SQLStatement as String
     set
      msSqlStatement = value
     end set
     get
      return msSqlStatement 
     end get
    end Property

    public Function makeSQLConnection as SQLConnection
     dim oSQLConn as new SQLConnection(msConnectionString)
     return oSQLConn
    end Function

    public Function GetRecords as DataView
     dim oCmd as new SQLDataAdapter(msSqlStatement, makeSQLConnection)
     dim oDS as new DataSet
     oCmd.FillDataSet(oDS,"RETURNDATASET")
     return oDS.Tables(0).DefaultView
    end Function
   end class
end namespace
Message #13 by Imar Spaanjaars <Imar@S...> on Thu, 19 Sep 2002 18:32:59 +0200
It looks like you have the current release (1.0) but are using ancient code.

FillDataSet has been renamed to Fill.

I suggest you trash your current book / article / reader and get your self 
a fresh copy updated for the final release.

It's rather difficult to debug code that was written for a previous / beta 
version.

Imar




At 05:31 PM 9/19/2002 +0000, you wrote:
>Also, is there a better way?
>
>My version is v1.0.3705
>
>and the error I got is:
>
>
>C:\Inetpub\wwwroot\bin>vbc /debug /nologo /t:library /out:SimpleVBBO.dll
>SimpleVBBO.vb /r:system.dll /r:system.data.dll
>C:\Inetpub\wwwroot\bin\SimpleVBBO.vb(4) : error BC30466: Namespace or
>type 'IXmlSerializable' for the
>Imports 'System.Xml.Serialization.IXmlSerializable' cannot be found.
>
>Imports System.Xml.Serialization.IXmlSerializable
>         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>C:\Inetpub\wwwroot\bin\SimpleVBBO.vb(37) : error BC30009: Reference
>required to assembly 'System.Xml' containing the implemented
>interface 'System.Xml.Serialization.IXmlSerializable'. Add one to your
>project.
>
>      dim oDS as new DataSet
>                     ~~~~~~~
>C:\Inetpub\wwwroot\bin\SimpleVBBO.vb(38) : error BC30456: 'FillDataSet'
>is not a member of 'System.Data.SqlClient.SqlDataAdapter'.
>
>      oCmd.FillDataSet(oDS,"RETURNDATASET")
>      ~~~~~~~~~~~~~~~~
>



  Return to Index