473,322 Members | 1,403 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Problems with Datasets, Viewers, and Vb

Hello All,

My problem right now is that I am trying to pull
information from a dataset and then place this information
dynamically in a combobox. This would work nicely if I
only had one table in my query. However, the query is
composed of three tables. How do I fix this? Help!

Thanks.

Karl
Nov 20 '05 #1
2 1089
Karl,
The number of Tables in the query should not matter.
If you have the Dataset populated with DataTables. Create
a view of the DataTable and bind it to the combobox.

Regards
Mahesh

-----Original Message-----
Hello All,

My problem right now is that I am trying to pull
information from a dataset and then place this informationdynamically in a combobox. This would work nicely if I
only had one table in my query. However, the query is
composed of three tables. How do I fix this? Help!

Thanks.

Karl
.

Nov 20 '05 #2
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!
Nov 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Mike Murphy | last post by:
Has anybody been experiencing problems with .NET 1.1 SP1? I installed it from Windows Update, but the "Microsoft .NET Framework 1.1 Configuration" dialog shows the build number prior to SP1! ...
0
by: Mike Peretz | last post by:
I don't know why, but for some reason exception do not serialize correctly when they hold a typed dataset. I have added code to serialize the dataset, but still when it gets to the other appDomain,...
2
by: jason | last post by:
Hello, Does anyone have any experience with 3rd Party Crystal Report viewers? I'm looking for a viewer that allows me to view reports in our web app without having crystal reports installed on the...
0
by: Kjetil | last post by:
Hi! I've got a WebService supplying me with a dataset: Webservice: DataSet ds = new DataSet(); OdbcDataAdapter adapter = new OdbcDataAdapter(select,connect); adapter.MissingSchemaAction =...
7
by: Martin Hazell | last post by:
I have had a form within a project that has been tested and working for the past 4-5 months. The other day, I decided to change all of my database connection strings into a dynamic property for a...
0
by: Mike Peretz | last post by:
I don't know why, but for some reason exception do not serialize correctly when they hold a typed dataset. I have added code to serialize the dataset, but still when it gets to the other appDomain,...
7
by: Railinc | last post by:
Hi... I'm trying to write a web service client and am running into a problem with getting a response back from the server. I know that a full xml message is being returned (thanks to a tcp/ip...
1
by: Magnus | last post by:
I have a set of typed datasets that are tied to a database on a mssql2005 server. They are naturally displayed and available in the DataSources window. Now I want to rename the database, but when I...
10
by: hughestroop | last post by:
I have updated my CSS and if you view the main page with the old css cached, it breaks the page. Is there any way to force viewers that have the old css cached to get the new css? Our viewers...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.