HighTechTalks DotNet Forums  

VERY NEW to VB .NET need help with a dll

Dotnet Distributed Applications microsoft.public.dotnet.distributed_apps


Discuss VERY NEW to VB .NET need help with a dll in the Dotnet Distributed Applications forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Randy
 
Posts: n/a

Default VERY NEW to VB .NET need help with a dll - 11-09-2007 , 03:44 PM






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

Reply With Quote
  #2  
Old   
Mohamad Elarabi
 
Posts: n/a

Default RE: VERY NEW to VB .NET need help with a dll - 12-18-2007 , 06:01 PM






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("Ch arge >
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:

Quote:
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

Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.