Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / VB.NET / March 2008

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rich - 19 Mar 2008 16:07 GMT
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.

Signature

Rich

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

GS - 19 Mar 2008 17:14 GMT
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.

> Hello,
>
[quoted text clipped - 20 lines]
> PS. I'm looking for a designer based solution, as I already have code based
> workarounds - thanks.
Miro - 19 Mar 2008 19:03 GMT
Take a look at this link:

http://msdn2.microsoft.com/en-ca/vs2008/bb507746.aspx?wt.slv=topsectionsee

im still too much of a beginner to try this but they created 3 projects in 1
solution and have the dataset in 1 project and reference it in the other.

This might be the example you are looking for - i just watched this last
week.

Miro

> Hello,
>
[quoted text clipped - 20 lines]
> PS. I'm looking for a designer based solution, as I already have code
> based workarounds - thanks.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.