Database System Concepts
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
Bartleby Related Questions Icon

Related questions

Question
How would I create this in Visual Basic along with the txt form to collect the employee data?
Create an application that allows the user to enter the
following employee data: First Name, Middle Name,
Last Name, Employee Number, Department, Telephone
Number, Telephone Extension, and E-mail Address. The
valid values for department are Accounting,
Administration, Marketing, MIS, and Sales. Once the
data is entered, the user should be able to save it to a
file. Figure 9-30 shows an example of the application's
form. The form shown in Figure 9-30 has a combo box
for selecting the department; a Save Record button,
which writes the record to a file; a Clear button, which
clears the text boxes; and an Exit button. Write code in
the Form_Load event handler that allows the user to
enter the name of the file. If the file does not exist, a
new one will be created. If the file already exists, the
input data will be appended to the file.
Figure 9-30 Employee Data form for saving employee records
Form1.vb [Design] X
Employee Data
Enter Employee Data
First Name:
Middle Name:
Last Name:
Employee Number:
Department:
Telephone:
expand button
Transcribed Image Text:Create an application that allows the user to enter the following employee data: First Name, Middle Name, Last Name, Employee Number, Department, Telephone Number, Telephone Extension, and E-mail Address. The valid values for department are Accounting, Administration, Marketing, MIS, and Sales. Once the data is entered, the user should be able to save it to a file. Figure 9-30 shows an example of the application's form. The form shown in Figure 9-30 has a combo box for selecting the department; a Save Record button, which writes the record to a file; a Clear button, which clears the text boxes; and an Exit button. Write code in the Form_Load event handler that allows the user to enter the name of the file. If the file does not exist, a new one will be created. If the file already exists, the input data will be appended to the file. Figure 9-30 Employee Data form for saving employee records Form1.vb [Design] X Employee Data Enter Employee Data First Name: Middle Name: Last Name: Employee Number: Department: Telephone:
empdata.txt x
1 Ada
2 A
Make sure to test your project by entering a new text
file name, and then to confirm you are appending data
to the file, run the program again and enter the same
text file name.
3 Adams
4 A1111
5
6
Save Record
You can confirm that the records you entered are in the
file. See attached graphic. Assume that the text file
name the user created was empdata.txt
Creating Employee Data - Microsoft Visual Studio
Eile Edit View Project Build Debug Team Tools Test Analyze Window Help
- O
22
Debug
▾ x86
▶ Start II
7
8
Employee Number:
Department:
Telephone:
Extension:
E-mail Address:
9
Accounting
9417775555
555
Clear
AAdams@abc.net
+
Exit
Solution Explorer
on os CE
Search Solution Explorer (Ctrl+
▷ References
A
D
4
bin
Debua
empdata.txt
Employee Data Part 1.exe
Employee Data Part 1.pdb
Employee Data Part 1.vshost.exe
Employee Data Part 1.vshost.exe.manifest
Employee Data Part 1.xml
Release
O Show all files
obj
Form1.vb
expand button
Transcribed Image Text:empdata.txt x 1 Ada 2 A Make sure to test your project by entering a new text file name, and then to confirm you are appending data to the file, run the program again and enter the same text file name. 3 Adams 4 A1111 5 6 Save Record You can confirm that the records you entered are in the file. See attached graphic. Assume that the text file name the user created was empdata.txt Creating Employee Data - Microsoft Visual Studio Eile Edit View Project Build Debug Team Tools Test Analyze Window Help - O 22 Debug ▾ x86 ▶ Start II 7 8 Employee Number: Department: Telephone: Extension: E-mail Address: 9 Accounting 9417775555 555 Clear AAdams@abc.net + Exit Solution Explorer on os CE Search Solution Explorer (Ctrl+ ▷ References A D 4 bin Debua empdata.txt Employee Data Part 1.exe Employee Data Part 1.pdb Employee Data Part 1.vshost.exe Employee Data Part 1.vshost.exe.manifest Employee Data Part 1.xml Release O Show all files obj Form1.vb
Expert Solution
Check Mark
Still need help?
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question

For the department combox, there needs to be a drop list for Accounting, Administration, Marketing, MIS, and Sales to choose from. How do I insert this into the program in visual basic ? 

Solution
Bartleby Expert
by Bartleby Expert
SEE SOLUTION
Follow-up Question

For the department combox, there needs to be a drop list for Accounting, Administration, Marketing, MIS, and Sales to choose from. How do I insert this into the program

Solution
Bartleby Expert
by Bartleby Expert
SEE SOLUTION
Follow-up Question

For the part, Dim sw As StreamWriter = File.AppendText(fileName). It says the file isnt declared. Why? and how do I fix this?

Solution
Bartleby Expert
by Bartleby Expert
SEE SOLUTION
Follow-up Question

For the code for the txt file.

Dim sw As Streamwriter = File.AppendText(fileName)

I get an error for the file.AppendText(fileName). How do i fix this. 

Solution
Bartleby Expert
by Bartleby Expert
SEE SOLUTION
Follow-up Question

What about the txt file that saves and records the data that is imputted? 

Solution
Bartleby Expert
by Bartleby Expert
SEE SOLUTION
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question

For the department combox, there needs to be a drop list for Accounting, Administration, Marketing, MIS, and Sales to choose from. How do I insert this into the program in visual basic ? 

Solution
Bartleby Expert
by Bartleby Expert
SEE SOLUTION
Follow-up Question

For the department combox, there needs to be a drop list for Accounting, Administration, Marketing, MIS, and Sales to choose from. How do I insert this into the program

Solution
Bartleby Expert
by Bartleby Expert
SEE SOLUTION
Follow-up Question

For the part, Dim sw As StreamWriter = File.AppendText(fileName). It says the file isnt declared. Why? and how do I fix this?

Solution
Bartleby Expert
by Bartleby Expert
SEE SOLUTION
Follow-up Question

For the code for the txt file.

Dim sw As Streamwriter = File.AppendText(fileName)

I get an error for the file.AppendText(fileName). How do i fix this. 

Solution
Bartleby Expert
by Bartleby Expert
SEE SOLUTION
Follow-up Question

What about the txt file that saves and records the data that is imputted? 

Solution
Bartleby Expert
by Bartleby Expert
SEE SOLUTION
Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education