Going Crazy nearly 2 weeks

M

Merlin

Hi Again Group,

Sorry to trouble you all again but i`ve been looking at this problem for 2
weeks now and just don`t seem to be able to grasp how to create a
relationship in VB.NET with ADO.NET.

I have the following:

Private Sub frmMainMenu_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Try
odaArcirisUsers.Fill(dsArcirisUsers)
Dim relArcirisUsers As New DataRelation("dsArcirisUsers",
dsArcirisUsers.Tables(0).Columns("SitesID"),
dsArcirisUsers.Tables(1).Columns("Sites Name"))
dsArcirisUsers.Relations.Add(relArcirisUsers)
Catch Ex As Exception
Console.WriteLine("Error: " & Ex.Message)
MsgBox("Error: " & Ex.Message)
End Try
dgdArcirisUsers.Expand(-1)
dgdArcirisUsers.NavigateTo(0, "ArcirisUsers")
End Sub

I have 2 Tables: 1 is My ArcirisUsers Table witch has the following Feilds:

ArcirisUserID (PrimaryKey)
POSID
USERNAME
BOMID
SITEID

Table 2 is My Sites IT which has:

SitesID(PrimaryKey)
SiteName
Company
Telephone

In my project I want to be able to update the feild on my ArcirisUsers Table
via Text Box`s. However I would like to have my SITEID on my Arciris Table
lookup the SITENAME in my Sites Table via a ComboBox, as it is doing in
access by a look up.

How do I do this im so confused, i`ve looked everywhere and seem to get
confused all the more, do i need 2 Dataadapters, and 2 Datasets of do i have
it all in the same Dataset?

Please Could someone help me?

Many Thanks
Regards
Merlin
 
C

CJ Taylor

Merlin,

Mail me at home cege ---__at_- tavayn ,-- dot 38--- com

be sure to take out the supid characters including the _ __ -- etc.
oh yes.. and the 38

my instant messanger address is mskillz at aol (no comments please). I
know we should post with the group but I understand how much trouble you've
been having with it and want to help get you through it. If people want,
we'll post the chat conversation.

Talk soon,

-CJ
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top