User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the C# section within the Software Development category of DaniWeb, a massive community of 428,202 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 3,231 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: Programming Forums

OLeDb Connection fail

Join Date: Apr 2008
Posts: 4
Reputation: khaled_nagaty is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
khaled_nagaty khaled_nagaty is offline Offline
Newbie Poster

Re: OLeDb Connection fail

  #5  
May 13th, 2008
Originally Posted by fishsqzr View Post
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
Reply With Quote  
All times are GMT -4. The time now is 3:12 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC