Hello,
I still seem to be having problems so I thought it would be helpful to
see the code.
The dataset (test) was generated from the OleDbAdapter (Configure this
adapter...) in VS.Net. This is the place where I created the sql query
using a combination of the Query Builder and some custom sql.
*test is my dataset *
*conn is SQL connection string*
Conn1 = New OleDb.OleDbConnection(conn)
OleDbDataAdapter.Fill(test)
Dim custTables As DataTable = test.Tables.Add("CustTable")
Dim custDV As DataView = New DataView(test.Tables("CustTable"))
Dim custDV2 As DataView = test.Tables("CustTable").DefaultView
Me.ComboBox2.DataSource = custDV2
Me.ComboBox2.DisplayMember = "SITE"
The program runs through this after pressing a button but nothing is
displayed. When it is pressed again, it crashes out with this error:
----------------------------------------
An unhandled exception of type 'System.Data.DuplicateNameException'
occurred in system.data.dll
Additional information: A DataTable named 'CustTable' already belongs to
this DataSet.
----------------------------------------
Is this the proper way to insert a dataset into a view/combobox? :)
Suggestions?
Thanks in advance.
Ciau...
Karl
*** Sent via Developersdex
http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!