473,597 Members | 2,040 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Help with the tables in VB 2005

5 New Member
hello everyone
i want a little help i made 2 table in the ms access (employee & evaluation) and i transfer it into the VB2005 and i set the primary key for both tables.


[PHP]Employee Table
----------------------------------------------------------
ID (PK) | Name | Salary
----------------------------------------------------------

Evaluation Table
----------------------------------------------------------
EmpID (FK) | Date (PK) | Comments
----------------------------------------------------------[/PHP]

when i start the program i enter the data of course i want to write more than one comments in one employee but when i write more than one data in the evaluation table the first data goes to the employee no1 and the other data goes to the employee no2 and so on.
but when i write the data i see EmpID show the ID of the employee i write on but after i do save it goes to the other Employee

[PHP]Employee Table:
----------------------------------------------------------
ID (PK) | Name | Salary
----------------------------------------------------------
1 | aaaa | $1000
2 | bbbb | $2500

Evaluation Table:
----------------------------------------------------------
EmpID (FK) | Date (FK) | Comments
----------------------------------------------------------
1 | 15/05/2007 | Good........... .....First Data
1 | 16/05/2007 | Bad............ ......Second Data[/PHP]

the (First data & the second Data) should goes to the first Employee but the First Data Goes to the First Employee & Second Data goes to the second employee and if i write a third it goes to the third one.

so i don't know what's the problem & i wish to help me with this.....
Feb 23 '07 #1
1 1026
willakawill
1,646 Top Contributor
hello everyone
i want a little help i made 2 table in the ms access (employee & evaluation) and i transfer it into the VB2005 and i set the primary key for both tables.


[PHP]Employee Table
----------------------------------------------------------
ID (PK) | Name | Salary
----------------------------------------------------------

Evaluation Table
----------------------------------------------------------
EmpID (FK) | Date (PK) | Comments
----------------------------------------------------------[/PHP]

when i start the program i enter the data of course i want to write more than one comments in one employee but when i write more than one data in the evaluation table the first data goes to the employee no1 and the other data goes to the employee no2 and so on.
but when i write the data i see EmpID show the ID of the employee i write on but after i do save it goes to the other Employee

[PHP]Employee Table:
----------------------------------------------------------
ID (PK) | Name | Salary
----------------------------------------------------------
1 | aaaa | $1000
2 | bbbb | $2500

Evaluation Table:
----------------------------------------------------------
EmpID (FK) | Date (FK) | Comments
----------------------------------------------------------
1 | 15/05/2007 | Good........... .....First Data
1 | 16/05/2007 | Bad............ ......Second Data[/PHP]

the (First data & the second Data) should goes to the first Employee but the First Data Goes to the First Employee & Second Data goes to the second employee and if i write a third it goes to the third one.

so i don't know what's the problem & i wish to help me with this.....
Interesting. You have Data as a primary key in the first example and a foreign key in the second example. As the word Date is a reserved word it is better to give this column a different name.

The example you have given shows the EmpID in your evaluation table to be correct in that it refers to employee number 1 in both cases.
Feb 23 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

7
4003
by: Phin | last post by:
I need your HELP! I've seen all the posts on using Crystal Reports within vs.net (vb.net) and changing a SQL query at runtime. When I tried to pass in a dataset into the crystal report at runtime, the report still showed the results from the default query (from within the Crystal Report). Then I tried the XSD solution where you define a dataset (that mataches the database and the Crystal Report) and have the Crystal Report use this....
2
4441
by: KoliPoki | last post by:
Greetings. I'm having a little trouble with a query. The idea is simple I need to display a list of recently unique visited URLs and the last time I visited. I have 2 table one stores the user and time/date and another has the URL. So all I need is the URL (no duplicates) and the last visit.
1
1792
by: prabhukalyan | last post by:
Hi all, I am not so good in queries. here is my problem 2 tables to store the received items (fabric)-- inwardmaster, inwarddetails and after some processing (Dyeing) the items were deliverd and stored in tables -- deliverymaster, deliverydetails
3
2512
by: Datatable Dataset Datagrid help | last post by:
Hi I am somewhat confused, I am new at VB.net I use XML data, I have a datagrid, I created a datatable so that I can create a custom format like true is this graphic false is this graphic and others. One of the custom format is as follows: dsmessages_dt.Columns.Add("Image", GetType(Image)) I had a problem of when I used a checkbox in the grid that was bound to the datatable that it would not update my dataset. So I created another...
7
3569
by: Richard | last post by:
I have a form with seven tapages. These span only one record with a large number of fields (textboxes). On Tabpage1 I display a number of read-only text boxes. This displays information about a particular Seller and is read from a SellerDataview at form load. On Tabpages 2-7, the information comes from another table/another DealDataview.
0
1186
by: samir dsf | last post by:
hi i have pasted page_load, my bindgrid, sort and itemdatabound event. my sorting in not working properly...i tried a couple of ways but there is something i am missing. pls suggest me on this .... i hadnt been able to figure out the solution for this. here is the original display in the dg==> Category Description Size(KB) Last Modified
1
371
by: uspensky | last post by:
kind of a tough one i think but any help is appreciated. please try to stay away from T-SQL... I have a table with products and closing dates for each of 4 quarters and annual for several years back. (Earning_Dates) I have another table that has those products with dates and closing prices. (undPrices) i have a third table which has the id for all the products. I need a query that will look at earning_dates and return the latest 6
4
1447
by: CK | last post by:
Good Morning, I have a person table with personID. I have a personRate table with personID, rateID, and effectiveDate. I need to select fields from personRate, but I want the fields from the proper record. I need the one child record that has the most current date of the largest rateID. For example a person may have many rate records. I need the record that has
11
1695
by: J.Evans.1970 | last post by:
Hello. I've got a table I'm trying to tie to two other tables. The problem is that there is nothing distinct between the 3 tables. Yes, I know... But this is what I have to work with. Let me explain exactly what it is I'm trying to do with a little background history. First, the fast food company I work for has registers in their stores. We capture TLD files from the registers every 15 minutes. On a daily basis those files are...
6
4178
by: nzkks | last post by:
Hi I am using these: ASP.Net 2.0 with VB.Net, Visual Studio 2005, SQL Server 2005 I suspect, there is something missing in BLL class. I created the ASP.Net form also and checked whether it is working or not. When I submit after entering the data, an error comes. Please help me to solve this problem. Thanks
0
7965
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8380
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8031
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8258
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6686
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5426
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3923
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1493
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1231
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.