473,395 Members | 1,457 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Going Crazy nearly 2 weeks

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
Nov 20 '05 #1
1 1046
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
"Merlin" <te**@nospam.com> wrote in message
news:te********************@karoo.co.uk...
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

Nov 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: spoilsport | last post by:
Ive got to write a multi-function program and I'm plugging in the functions but I keep getting this error from line 40. Im new to this and cant find an answer anywhere. Sam #include...
19
by: Daniel Billingsley | last post by:
I think it's really nice to be able to do code like someVariable = someMethod(new SomeClass("some text")); However, as method signatures are number and types of parameters, you're limited to...
3
by: Larry Tate | last post by:
I have had a monstrous time getting any good debugging info out of the .net platform. Using ... ..NET Framework 1.1 Windows 2K Server VB.NET <- is this the problem? error handling in the...
1
by: ajaymehra | last post by:
Hi, Im trying to create a "MS Project > Resource Usage" type o application report. The manager will see his resources work hour distributed along a default time period (say 1 month). He then has...
7
by: Miguel Dias Moura | last post by:
Hello, In an ASP.Net / VB web page I want to display an image which filename depends of a parameter on the URL. I have this:
1
by: Zack | last post by:
I am writing an app using FileSystemWatcher and just went a little class crazy. I have the following classes Server MasterServer inherits server SlaveServer inherits server SiblingServer...
2
by: Aron Roberts | last post by:
When I create a function with an argument or return type of say an integer the data type seems to be passed properly. When trying for instance to send or return an integer array it always seems to...
6
by: thomas.luce | last post by:
Okay, I have been programming for a long time, and am getting back into C after about a 4 year break from it. Below is some code that won't compile for the life of me, and it is driving me crazy!...
1
by: =?Utf-8?B?TWFnaWNQYXdz?= | last post by:
Hi, I have a folder in My Documents which contains a digital scrapbooking kit, and whenever I click on the folder I get the dreaded DEP message ... it is a paid for kit, and therefore ? unlikely to...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.