•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the C# section within the Software Development category of DaniWeb, a massive community of 375,199 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,121 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C# advertiser:
Views: 412 | Replies: 5
![]() |
•
•
Join Date: Dec 2003
Location: Nashville, TN
Posts: 2,330
Reputation:
Rep Power: 11
Solved Threads: 101
•
•
Join Date: Apr 2008
Posts: 4
Reputation:
Rep Power: 0
Solved Threads: 0
Hi Alex,
Thank for your reply, but really I do not receive any error messages it just does nothing. The connection is opened and I can test it but the problem is when I drag the database node from the database explorer to the Windows Form it does nothing.
I am working on an Express Edition of VC#, do you think this may be the cause of the problem?
I also noticed that I do not have an OleDbDataAdpater in the Toolbox of this edition.
The connection with the database is working well in the Console environment, I tried the sample application in the Help.
regards
Khaled
Thank for your reply, but really I do not receive any error messages it just does nothing. The connection is opened and I can test it but the problem is when I drag the database node from the database explorer to the Windows Form it does nothing.
I am working on an Express Edition of VC#, do you think this may be the cause of the problem?
I also noticed that I do not have an OleDbDataAdpater in the Toolbox of this edition.
The connection with the database is working well in the Console environment, I tried the sample application in the Help.
regards
Khaled
Last edited by khaled_nagaty : May 11th, 2008 at 7:03 am.
•
•
Join Date: Aug 2007
Location: Gunnison, Colorado
Posts: 54
Reputation:
Rep Power: 1
Solved Threads: 1
Are you just dragging a connection component into your form and setting it up, or are you allowing Visual Studio to build a typed dataset? Or, maybe you are trying to drag objects from Database Explorer, which doesn't work.
First, you need a project open. Then on the C# menu, select Data, Add New Datasource. Go through the dialogs to indicate what you want to connect to, then VS will generate the connection, dataset, adapters and binding sources needed. The tables (and possibly other data objects) will be displayed in the Data Sources window. If it doesn't appear automatically, use the menu selection Data, Show Data Sources to open it. It is the Data Sources window which you use to drag tables and other data objects to your form to automatically add the controls and components needed.
Hope that helps.
First, you need a project open. Then on the C# menu, select Data, Add New Datasource. Go through the dialogs to indicate what you want to connect to, then VS will generate the connection, dataset, adapters and binding sources needed. The tables (and possibly other data objects) will be displayed in the Data Sources window. If it doesn't appear automatically, use the menu selection Data, Show Data Sources to open it. It is the Data Sources window which you use to drag tables and other data objects to your form to automatically add the controls and components needed.
Hope that helps.
•
•
Join Date: Apr 2008
Posts: 4
Reputation:
Rep Power: 0
Solved Threads: 0
•
•
•
•
Are you just dragging a connection component into your form and setting it up, or are you allowing Visual Studio to build a typed dataset? Or, maybe you are trying to drag objects from Database Explorer, which doesn't work.
First, you need a project open. Then on the C# menu, select Data, Add New Datasource. Go through the dialogs to indicate what you want to connect to, then VS will generate the connection, dataset, adapters and binding sources needed. The tables (and possibly other data objects) will be displayed in the Data Sources window. If it doesn't appear automatically, use the menu selection Data, Show Data Sources to open it. It is the Data Sources window which you use to drag tables and other data objects to your form to automatically add the controls and components needed.
Hope that helps.
Thank for your reply, I used the DataGridView and then I chose a data source, the table appeared in the DataGridView but empty . The name of my database is "Books.mdb ", the name of the class is "DisplayDB ", when I tried to build the project I got two errors:
Error1
The type name 'BooksDataSet' does not exist in the type
'DisplayDB.DisplayDB' C:\Documents and Settings\dr.khaled\Local Settings\Application Data\Temporary Projects\DisplayDB\Program.cs
Error2
The type name 'BooksDataSetTableAdapters' does not exist in the type 'DisplayDB.DisplayDB 'C:\Documents and Settings\dr.khaled\Local Settings\Application Data\Temporary Projects\DisplayDB\Program.cs
regards
Khaled
•
•
Join Date: Aug 2007
Location: Gunnison, Colorado
Posts: 54
Reputation:
Rep Power: 1
Solved Threads: 1
Let me explain a way to do this, step by step.
Open a new project. From the main menu select Data | Add new data source. In the Configuration Wizard select Database and then click Next. In the window labeled "Choose your connection" you will hopefully see your connection. If not, you can try to create it with the New Connection button but just what happens depends on what kind of data you are using (Access, SQL Server, ???).
If you find your data, click Next until you get to the window labeled "Choose your database objects". You need to open the Tables group and then select the tables you want to work with by clicking the little boxes next to the tables. Then, click Finish. NOTE-If any of these steps fail, you probably have not set up a valid connection to your data. Fixing that gets complicated and it depends on what your data is. If it is Access it is usually fairly simple to fix. If it is SQL Server, you may have a problem as there are a lot of variables and you will need help from someone who knows more than I do.
Now you have created a typed dataset. Use the VS menu to select Data | Show data sources You should see your data and the table or tables you selected. You can drag the table to a form to create controls. Run the program to see the actual data (VS does not show it during design, unfortunately).
Hope that helps.
Open a new project. From the main menu select Data | Add new data source. In the Configuration Wizard select Database and then click Next. In the window labeled "Choose your connection" you will hopefully see your connection. If not, you can try to create it with the New Connection button but just what happens depends on what kind of data you are using (Access, SQL Server, ???).
If you find your data, click Next until you get to the window labeled "Choose your database objects". You need to open the Tables group and then select the tables you want to work with by clicking the little boxes next to the tables. Then, click Finish. NOTE-If any of these steps fail, you probably have not set up a valid connection to your data. Fixing that gets complicated and it depends on what your data is. If it is Access it is usually fairly simple to fix. If it is SQL Server, you may have a problem as there are a lot of variables and you will need help from someone who knows more than I do.
Now you have created a typed dataset. Use the VS menu to select Data | Show data sources You should see your data and the table or tables you selected. You can drag the table to a form to create controls. Run the program to see the actual data (VS does not show it during design, unfortunately).
Hope that helps.
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb C# Marketplace
- mysql and oledb .net problems (MySQL)
Other Threads in the C# Forum
- Previous Thread: GUI - very simple, but still couldnt solve, help pls
- Next Thread: how to compute a string in c#???



Linear Mode