Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
DotNet
acad.assignment.mngr
academic
adonet
aspnet
aspnet.announcements
aspnet.build.controls
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
clr
compactframework
component_services
datatools
distributed_apps
drawing
faqs
framework
framework.wmi
general
internationalization
interop
languages.csharp
languages.jscript
languages.vb
languages.vb.controls
languages.vb.data
languages.vb.upgrade
languages.vc
languages.vc.libraries
myservices
odbcnet
performance
remoting
scripting
sdk
security
setup
vjsharp
vsa
webservi.enhancements
webservices
windowsforms
windowsforms.controls
winforms.databinding
winforms.designtime
xml
  
 
date: Fri, 9 Nov 2007 12:44:01 -0800,    group: microsoft.public.dotnet.distributed_apps        back       


VERY NEW to VB .NET need help with a dll   
refLateChargesTableAdapterI am very new to VB .NET and I am having some 
trouble.  I want to create a DLL file that will house functions that other 
systems can call.  My major problem is that these functions need to use 
tables to do their processing and I want the tables to be in the dll so that 
I can distribute the dll to the  various networks that are in my company.  I 
read that DLL files can contain tables as well as code and I have 
successfully put tables in the dll project I created but I have no ideal how 
to connect to these tables from my functions.  

The tables are in a dataset called 'Dataset1'.  The first table I am trying 
to access is called 'refLateChargesTable'.  I don't know what a 
connectionstring would look like for these tables.

Any help would be appreciated. 

Thanks,
Randy
date: Fri, 9 Nov 2007 12:44:01 -0800   author:   Randy

RE: VERY NEW to VB .NET need help with a dll   
I'm trying to understand what exactly you're trying to do. So far I think 
you're trying to use a dataset as a dynamic resource inside a DLL. This I 
think isn't possible, although I don't have much experience doing that but I 
believe that once a DLL is compiled it is really no longer changeable without 
a recompile. So unless you're storing static data, you might need to 
reconsider your approach to maybe accessing an XML file or a similar resource 
type that is detached from the DLL itself. 

You can however add the XML file (or the like) to your setup project to be 
deployed alongside your DLL. This way it is guaranteed to be there, next to 
your DLL in production.

In case your have a DataSet called MyDataSet here is code you'll need to 
write to extract data out of your table. 

This example select all rows with a charge over 50 dollars and sorts them by 
the charge value descendingly.

Dim MySelectResults As DataRow()
MySelectResults = MyDataSet.Tables("refLateChargesTable").Select("Charge > 
50","Charge Desc")

For Each oRow As DataRow In MySelectResults
	MsgBox(oRow.Item("ID"))
Next

Also check http://msdn2.microsoft.com/en-us/library/way3dy9w.aspx for 
additional examples.

Hope that helps.

-- 
Mohamad Elarabi
Lead Developer. MCTS, MCPD.


"Randy" wrote:

> refLateChargesTableAdapterI am very new to VB .NET and I am having some 
> trouble.  I want to create a DLL file that will house functions that other 
> systems can call.  My major problem is that these functions need to use 
> tables to do their processing and I want the tables to be in the dll so that 
> I can distribute the dll to the  various networks that are in my company.  I 
> read that DLL files can contain tables as well as code and I have 
> successfully put tables in the dll project I created but I have no ideal how 
> to connect to these tables from my functions.  
> 
> The tables are in a dataset called 'Dataset1'.  The first table I am trying 
> to access is called 'refLateChargesTable'.  I don't know what a 
> connectionstring would look like for these tables.
> 
> Any help would be appreciated. 
> 
> Thanks,
> Randy
date: Tue, 18 Dec 2007 15:01:01 -0800   author:   Mohamad Elarabi

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us