VB.NET School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become a VB.NET Expert!

Join 307,148 VB.NET Programmers for FREE! Get instant access to thousands of VB.NET experts, tutorials, code snippets, and more! There are 1,735 people online right now. Registration is fast and FREE... Join Now!




Database with microsoft visual studio 2008

 

Database with microsoft visual studio 2008, problem:(

abou azzam

2 Jul, 2009 - 12:50 AM
Post #1

New D.I.C Head
*

Joined: 30 Jun, 2009
Posts: 4

Hi I'm using Microsoft visual studio 2008
I am trying to control an access database with my program.
I am using Visual basic.net as a programming language.
It's look like I can do a simple (read-navigate-update...) without writing code in Visual Studio 2008 by:

1- new windows form application project.

2- loading my data source (table).

3- drag and drop to my form my table from Data Sources tab after changing it to (Details).

4- Visual studio will automatically make> ( data set - Binding source - table adapter - table adapter manager - binding navigator ).

5- I run my program> my dataBase looks fine> I can navigate>add records > but when I delete some records then Save> an error occur << Update requires a valid DeleteCommand when passed DataRow collection with deleted rows. >>


Is there any code missing I should add?
or the problem is in the table itself?
or it's something else?

This post has been edited by abou azzam: 2 Jul, 2009 - 12:55 AM

User is offlineProfile CardPM
+Quote Post


corliss

RE: Database With Microsoft Visual Studio 2008

2 Jul, 2009 - 10:03 PM
Post #2

D.I.C Head
Group Icon

Joined: 25 Oct, 2006
Posts: 170



Thanked: 1 times
Dream Kudos: 50
My Contributions
Hi abou azzam,
Check out this link:
http://social.msdn.microsoft.com/Forums/en...ec-b6498d41823f
it should solve your problem.
It speaks to setting the PK in your database.
Cheers and hope it helps.
User is offlineProfile CardPM
+Quote Post

PsychoCoder

RE: Database With Microsoft Visual Studio 2008

2 Jul, 2009 - 10:15 PM
Post #3

I Code, Therefore I am
Group Icon

Joined: 26 Jul, 2007
Posts: 14,937



Thanked: 517 times
Dream Kudos: 11575
Expert In: VB, VB.Net, C#, SQL, ASP, ASP.Net, Web Development, HTML, CSS, Win32 API, Javascript, mySQL, J#, Boo.Net, jQuery

My Contributions
Moved to VB.NET smile.gif
User is offlineProfile CardPM
+Quote Post

firebolt

RE: Database With Microsoft Visual Studio 2008

2 Jul, 2009 - 10:35 PM
Post #4

D.I.C Lover
Group Icon

Joined: 20 Feb, 2009
Posts: 5,476



Thanked: 77 times
Dream Kudos: 1675
My Contributions
Is there a code that goes with it?
QUOTE
Is there any code missing I should add?

Or then what is this meant to mean?
User is offlineProfile CardPM
+Quote Post

abou azzam

RE: Database With Microsoft Visual Studio 2008

5 Jul, 2009 - 05:52 AM
Post #5

New D.I.C Head
*

Joined: 30 Jun, 2009
Posts: 4

QUOTE(corliss @ 2 Jul, 2009 - 10:03 PM) *

Hi abou azzam,
Check out this link:
http://social.msdn.microsoft.com/Forums/en...ec-b6498d41823f
it should solve your problem.
It speaks to setting the PK in your database.
Cheers and hope it helps.


Thank you very mush... That was so useful smile.gif
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/21/09 04:10PM

Live VB.NET Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

VB.NET Tutorials

Reference Sheets

VB.NET Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month