By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,916 Members | 1,286 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,916 IT Pros & Developers. It's quick & easy.

how to reference strognly typed dataset up mulitple projects

P: n/a
I'm writing an winforms app in vb.net 1.1 and am having trouble referencing
a strongly typed dataset in the UI project. The dataset's source is behind
a web service and the data project (client side) gets a reference to the
dataset schema and all that comes with strongly typing a dataset via a
reference to the web service. The business tier which depends on the data
tier and also imports the namespace of the data project can reference this
dataset OK due to importing the data project's namespace. However, up one
more level in the UI project I can't reference the dataset because it's main
reference exists in the data tier and can not be seen through the business
tier.

For example, the project as names are as follows

VIPNow_WinUI UI tier
VIPNow_WinBLL Business tier
VIPNow_WinDAL Client side data tier

wsVA is the reference to the web service in the data tier
dsVAL_LU is the name of the dataset
tbVA_LU is a data table in the dataset

and the msg in the blue squiggly is:

Public ReadOnly Property tbVA_LU() As
VIPNow_WinDAL.wsVA.dsVAL_LU.tbVA_LUDataTable' is declared in project
'VIPNow_WinDAL.dll', which is not referenced by project 'VIPNow_WinUIL.exe'.

One of many reasons I need to reference the dataset in the UI tier is
because I pass parts of the dataset such as a datatable from the business
tier to the UI tier. another reason is I can have intellesence on the
dataset while having it's original source (where its strongly typed) in one
single place for the entire application which is behind the web service on
the server.

Is there a way to reference this dataset in the UI tier?

--
mo*******@nospam.nospam
Nov 21 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Moondaddy,

Is it possible that you give us this question step by step. I have now the
idea to see a complete architectural building in one newsgroup message.

Just my thought,

Cor
Nov 21 '05 #2

P: n/a
Hi

I did not understand your scenario very clear.
Can we simplify the scenario as below?
You have a typed dataset class in project A, and you want the project B to
use the dataset directly without generate again.
If so, I think you may need to do the similar job project B, because the
dataset class is regenerated everytime you make a single change..

If I have any misunderstanding, please feel free to post here. Also can you
specify your scenario more clearly?

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 21 '05 #3

P: n/a
"moondaddy" <mo*******@nospam.nospam> wrote in message
news:Op**************@TK2MSFTNGP09.phx.gbl...

In order to use the DataSet in the UI layer, you must have a reference
to the DLL in which the Type is defined. Since these objects are
being generated from a Web Service, the definition, presumably, is
somewhere server side.

However, in order to use your Typed DataSet on the client, the client
application needs its own reference the Dll that defines your Typed
DataSet class. Same assembly, deployed into two places. (There's
another way using Interfaces, but I haven't got there yet).

HTH,
Phill W.
Nov 21 '05 #4

P: n/a
Thanks. yes I was able to use the typed dataset in the UI by referencing
the data tier dll in the UI, but this seemed like a hack as the business
object should hold a reference to the data dll, and the UI dll hold a
reference to the business dll. I was hoping there was another way around
this.

--
mo*******@nospam.nospam
"Phill. W" <P.A.Ward@o-p-e-n-.-a-c-.-u-k> wrote in message
news:d9**********@yarrow.open.ac.uk...
"moondaddy" <mo*******@nospam.nospam> wrote in message
news:Op**************@TK2MSFTNGP09.phx.gbl...

In order to use the DataSet in the UI layer, you must have a reference
to the DLL in which the Type is defined. Since these objects are
being generated from a Web Service, the definition, presumably, is
somewhere server side.

However, in order to use your Typed DataSet on the client, the client
application needs its own reference the Dll that defines your Typed
DataSet class. Same assembly, deployed into two places. (There's
another way using Interfaces, but I haven't got there yet).

HTH,
Phill W.

Nov 21 '05 #5

P: n/a
Hi

Based on my understanding, the relation is as below.
UI->BL->DL--->WebService.
The Strong typed DataSet in Webservice will be exposed to DL, and DL will
regerate a its namespaced strong typed dataset.

I think in the common design scenario, the BL should encapsulate all the
data layer, the UI layer should not access to the dataset directly. The
Business layer should exposed the meaningful Object to the UI layer.
e.g. modal the employee table as the employee object, and use the
employee.name, employee.Add and so on method or property to hide the
concrete data in the dataset.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 21 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.