Question on databinding windows control to dataset in another project...


R

Rich

Hello,

Using VS 2008 to create a Windows app, I need to bind a combo box on a form
in my main app to a dataset I created in my business logic layer.

The business logic is in a separate project under the same solution as thge
main app.

I can't seem to find any way of getting the combo box bound to the dataset
to do a simple lookup. I have tried adding a project datasource to get a
reference to the dataset, and can even use the designer to select which
display and value properties to bind to. But when I run the app no binding
happens and the combo is blank.

If I create the same datasource within the main app project, it binds
perfectly. Incidentally, when binding in this way (dataset in same project)
I get a tableadapter and dataset appear on the form as well as the
bindingsource component. When binding to an object in the other project, I
just get a bindingsource on the form.

Any suggestions greatly appreciated!

PS. I'm looking for a designer based solution, as I already have code based
workarounds - thanks.

--

Rich

http://www.badangling.com
....talking pollocks since 1996
 
Ad

Advertisements

G

GS

there are a few ways to use the code you have in a different project
1. add reference to your business project.. I have used components that
were built as dll/com from different project
2. have you tried the combo box as components or user control instead of
windows app?
3 .work around make sure you don't reproduce the dataset ( .mdf or whatever
file in your project. directory when you create. sometimes you get prompt
about copy to project, say no. If you say yes to either project you will
have problem


I am sure there are more knowledgeable people that will give you more
details. The above just start you thinking possible problems.
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top