Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB.NET 1.0 > Pro VB.NET 2002/2003
|
Pro VB.NET 2002/2003 For advanced Visual Basic coders working .NET version 2002/2003. Beginning-level questions will be redirected to other forums, including Beginning VB.NET.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB.NET 2002/2003 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 26th, 2005, 11:57 PM
Registered User
 
Join Date: Sep 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to tommyboy1910 Send a message via Yahoo to tommyboy1910
Default displayin multiple/same datasets in ma combo box

Hello..
im desperately need sumone's help to sovle ma combo box prob..
im using sql server 2000 connected to ma vb.net application..
when i open n close n open back a form which contains combo box..
it displays a multiple datasets ..for example..

lets say ma combo box contains...
A01
A02
A03
A04
A05
A06

n if i open a form again then it wil display t list of combo box like this..
A01
A02
A03
A04
A05
A06
A01
A02
A03
A04
A05
A06

plz...sumone guide me urgently/immedietely...as i hv to b dun this proj b4 tis thursday, 29th September 2005

here in i hv attached also ma code..

    Public sqlEmp As String = "Select * from [Employee] order by id"
    Public sqlMT As String = "Select * from [monthly type]"
    Public sqlGr As String = "Select * from [Grade]"
    Public sqlPos As String = "Select * from [Position]"
    Public sqlEmpStas As String = "Select * from [Employee Status]"
    Public sqlEmpType As String = "Select * from [EmploymentType]"
    Public sqlBank As String = "Select * from [Bank]"
    Public sqlBB As String = "Select * from [Bank Branch]"

    Public ds0, ds1, ds2, ds3, ds4, ds5, ds6, ds7, ds8, ds9 As New DataSet

    Public dvm0 As DataViewManager = ds1.DefaultViewManager
    Public dvm1 As DataViewManager = ds1.DefaultViewManager
    Public dvm2 As DataViewManager = ds2.DefaultViewManager
    Public dvm3 As DataViewManager = ds3.DefaultViewManager
    Public dvm4 As DataViewManager = ds4.DefaultViewManager
    Public dvm5 As DataViewManager = ds5.DefaultViewManager
    Public dvm6 As DataViewManager = ds6.DefaultViewManager
    Public dvm7 As DataViewManager = ds7.DefaultViewManager
    Public dvm8 As DataViewManager = ds8.DefaultViewManager



        Try
            'Open connection

            myConn.Open()
            Dim da0 As SqlDataAdapter = New SqlDataAdapter(sqlEmp, myConn)
            Dim da1 As SqlDataAdapter = New SqlDataAdapter(sqlMT, myConn)
            Dim da2 As SqlDataAdapter = New SqlDataAdapter(sqlGr, myConn)
            Dim da3 As SqlDataAdapter = New SqlDataAdapter(sqlPos, myConn)
            Dim da4 As SqlDataAdapter = New SqlDataAdapter(sqlEmpType, myConn)
            Dim da5 As SqlDataAdapter = New SqlDataAdapter(sqlEmpStas, myConn)
            Dim da6 As SqlDataAdapter = New SqlDataAdapter(sqlPayStas, myConn)
            Dim da7 As SqlDataAdapter = New SqlDataAdapter(sqlBank, myConn)
            Dim da8 As SqlDataAdapter = New SqlDataAdapter(sqlBB, myConn)


            da0.Fill(ds0, "[Employee]")
            cb0.DataSource = dvm0
            cb0.DisplayMember = "[Employee].emp_no"

            da1.Fill(ds1, "[monthly type]")
            cb1.DataSource = dvm1
            cb1.DisplayMember = "[monthly type].description"

            da2.Fill(ds2, "[Grade]")
            cb2.DataSource = dvm2
            cb2.DisplayMember = "[Grade].description"

            da3.Fill(ds3, "[Position]")
            cb3.DataSource = dvm3
            cb3.DisplayMember = "[Position].description"

            da4.Fill(ds4, "[EmploymentType]")
            cb4.DataSource = dvm4
            cb4.DisplayMember = "[EmploymentType].description"

            da5.Fill(ds5, "[Employee Status]")
            cb5.DataSource = dvm5
            cb5.DisplayMember = "[Employee Status].description"

            da6.Fill(ds6, "[Payroll Status]")
            cb6.DataSource = dvm6
            cb6.DisplayMember = "[Payroll Status].description"

            da7.Fill(ds7, "[Bank]")
            cb7.DataSource = dvm7
            cb7.DisplayMember = "[Bank].Bank"

            da8.Fill(ds8, "[Bank Branch]")
            cb8.DataSource = dvm8
            cb8.DisplayMember = "[Bank Branch].Branch"
        Catch ae As SqlException
            MessageBox.Show(ae.Message)
        Finally
            myConn.Close()
        End Try


regards
dave libranza oneal





Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple Datasets from multiple Data Sources SQL_Hacker Reporting Services 1 June 18th, 2008 02:25 PM
Combo box to display items from parent combo box Gini Visual Studio 2008 0 June 18th, 2008 12:30 AM
Combo box choice creating filtered combo box stevensj5 Access 11 September 13th, 2007 11:33 AM
Multiple Coloumns Of a Combo Box sweetad Pro VB Databases 1 March 8th, 2006 09:52 AM
Multiple Coloumns Of a Combo Box sweetad SQL Language 1 December 31st, 2005 07:15 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.