Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx thread: Beta2 DLL problem


Message #1 by "Betti Alessandro\(TXT\)" <betti@g...> on Thu, 13 Sep 2001 09:50:40 +0200
In beta2 i use System.Data.OleDb for connect my DB to my application

.All works well when i use OleDb in ASP.Net for example this code work

fine :

-------------------------------------------------------------

       dim con as New OleDbConnection

       dim com as OleDbDataAdapter

       dim strConnect as string

       dim strCommand as string

       dim dsl as new DataSet()

     

       strConnect "Provider       strCommand        Com        

Com.Fill(dsl, "Users")

       MyDataGrid.DataSource=DAbles("Users").DefaultView

       MyDataGrid.DataBind()

---------------------------------------------------------------



BUT when i put this code in a .Dll file for example:



------------------------------------------------------------------

Imports System

Imports System.Data

Imports System.Data.OleDb

Imports Microsoft.VisualBasic



Namespace user

Public Class USERClass



Public Function GetUserByID(userid as string) as DataView



       dim con as New OleDbConnection

       dim com as OleDbDataAdapter

       dim strConnect as string

       dim strCommand as string

       Dim dsl As DataSet

     

       strConnect "Provider       strCommand        Com        

Com.Fill(dsl, "Users")

       GetUserByID=DAbles("Users").DefaultView         

      End Function



End Class

End Namespace

-----------------------------------------------------------------

And i compile with VBC.exe the response is



I:\ASP_PIU\ASP_PIU_Local\bin\DB_USER\user.vb(19) : error BC30009: Unable 



to find a reference to asse

mbly 'System.Xml' containing the implemented interface

'System.Xml.Serialization.IXmlSerializable'.

Add one to your project.



       Dim dsl As DataSet                   ~~~~~~~



Someone Know why?



Thanks to All





       __------__

 |\__-- /\       _-      Ing. Betti Alessandro

 |/    __       _        Email: betti@g...

 //\  /  \     /__       URL:http://www.txt.it

 |  o|  0|__      --_    Tel :(+39)010 4610361

 \\____-- __ \   ___ -

  (@@    __/  / /

    -_____---






  Return to Index