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

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




Dataset editing problems

 
Reply to this topicStart new topic

Dataset editing problems

Geanon
25 Jan, 2008 - 06:42 AM
Post #1

New D.I.C Head
*

Joined: 25 Jan, 2008
Posts: 1


My Contributions
hi i'm trying to make a game using visual basic but am having difficulty connecting this up to a database

i have connected the database to the program and made a dataset using this but every time i try and edit the information using buttons i get back an error saying that

!Reference to a non-shared member requires an object reference! crazy.gif

this is the code i have trying to edit the information

CODE
  

Private Sub Human_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Human.Click

        Dim newCharactor As GameDataDataSet.CharactorRow()
        newCharactor = GameDataDataSet.Charactor.CharactorRow()

        newCharactor.Name = CharName.Text
        newCharactor.Race = "Human"

        GameDataDataSet.Charactor.Rows.Add(newCharactor)

        FrmClass.Show()
        Me.Hide()

EndSub


the database is named GameData.mdb and the dataset is called GameDataDataSet.xsd

is there some kind of code that i am missing or something i need to do to either the dataset or the database as i cannot find out how to do this.

any help will be apreciated
User is offlineProfile CardPM
+Quote Post

PsychoCoder
RE: Dataset Editing Problems
25 Jan, 2008 - 07:20 AM
Post #2

using DIC.Core;
Group Icon

Joined: 26 Jul, 2007
Posts: 9,483



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

My Contributions
This is a VB.Net question so moving to the proper forum smile.gif
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/8/09 04:37PM

Be Social

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

Live VB.NET Help!

VB.NET Tutorials

Reference Sheets

VB.NET Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month