Explain the purpose of a dataset and describe how to create a
dataset called dsEmployee in Visual Studio 2012. Assume you have
the following function in the clsDataLayer class. Write the SQL
command to select all rows from the tblEmployee table, and write
the code to fill the dataset.
public static dsEmployee GetEmployee(string Database)
{
dsEmployee DS;
OleDbConnection sqlConn;
OleDbDataAdapter sqlDA;
sqlConn = new OleDbConnection("PROVIDER=Microsoft.ACE.OLEDB.12.0;"
+
"Data Source=" + Database);
// Write the code here to select all rows from the tblEmployee
table
_______________________________________________________
DS = new dsEmployee();
// Write the code here to populate the dataset
________________________________________________________
return DS;
}
Explain the purpose of a dataset and describe how to create a dataset called dsEmployee in...
DROP TABLE EMPLOYEE;
DROP TABLE JOB;
DROP TABLE EMP;
DROP TABLE EMP_1;
DROP TABLE EMP_2;
CREATE TABLE JOB(JOB_CODE CHAR (3) PRIMARY KEY, JOB_DESCRIPTION
VARCHAR (20) NOT NULL,JOB_CHG_HOUR NUMBER (5,2) NOT
NULL,JOB_LAST_UPDATE DATE NOT NULL);
INSERT INTO JOB
VALUES('500','Programmer','35.75','20-Nov-2017');
INSERT INTO JOB VALUES('501','System
Analyst','96.75','20-Nov-2017');
INSERT INTO JOB VALUES('502','Database
Designer','125.00','24-Mar-2018');
CREATE TABLE EMPLOYEE(EMP_NUM CHAR (3) PRIMARY KEY,EMP_LNAME
VARCHAR (15) NOT NULL,EMP_FNAME VARCHAR (15) NOT NULL, EMP_INITIAL
CHAR (1),EMP_HIREDATE DATE NOT NULL,JOB_CODE CHAR (3), EMP_YEARS
NUMBER (2),FOREIGN KEY (JOB_CODE) REFERENCES JOB (JOB_CODE));
INSERT...
CIS 411w spring 2017 Problem Set 11 1 Log in to your Oracle ApEx account. 2. Create a new table called email with this command: CREATE table email as (SELECT empno, ename||'.'||SUBSTR(JOB,1,2)||'@apex.com' as "EMAIL" from emp); Click à Run to create this table 3. Write a SQL query that JOINS the three tables emp,dept and email. This SQL query will return the empno, ename, job, sal, loc and email for each employee. Use the newer ANSI JOIN syntax rather...
For this hands-on project, you will use the SQL Server named instance SQLSERVERHOA, and the HandsOnOne database and tables you created in previous chapters. The objective of this activity is to practice generating keys and encrypting/decrypting data. Document each step by taking a screen shot of the Query Editor window after successfully executing each SQL query. 1.In SQL Server Management Studio, open a new Query Editor window, which you will use for completing all steps in this activity. 2.Create a...
Java Programming help!!!
Anthony W. Smith, 2017 Purpose Purpose of this lab is for you to develop a program where many objects are created from a class. Primitives and objects are passed as parameters to class methods. Problem specification Your new wallet class implements a wallet that contains banknotes. A banknote is represented as an int for simplicity, 1 for a SI bill, 5 for a $5 bill, and so on. You are required to use a simple array ofint...
Tables: Create table Item( ItemId char(5) constraint itmid_unique primary key, Decription varchar2(30), Unitcost number(7,2)); Create table Customer( custID char(5) constraint cid.unique primary key, custName varchar2(20), address varchar2(50)); Create table Orderdata( orderID char(5) constraint oid_uniq primary key, orderdate date, shipdate date, ItemId char(5) references Item.ItemId, No_of_items number(4), Unitcost number(7,2), Order_total number(7,2), custID char(5) references customer.custID); Insert Into Item values(‘A123’,’Pencil’,2.5); Insert Into Item values(‘B123’,’Pen’,15); Insert Into...
Here is my code to insert data into a database.
code:
private void button2_Click(object sender, EventArgs
e)
{
//Insert Button
string connString = "Provider=Microsoft.ACE.OLEDB.12.0;" +
"Data Source = C:\project\patientDB.accdb";
OleDbConnection connection = new OleDbConnection(connString);
OleDbCommand cmd = connection.CreateCommand();
cmd.CommandText = "insert into Medical
([PatientID],[GeneralMedicalHistoryID],[Education] values ('" +
textBox1.Text + "','" + textBox2.Text + "','" + textBox3.Text + "'
)";
connection.Open();
cmd.ExecuteNonQuery();
MessageBox.Show("Record Inserted");
connection.Close();
}
However it says syntax error in INSERT statement when I
try to add. What am...
/* * Purpose: Test an implementation of an array-based list ADT. * To demonstrate the use of "ListArrayBased" the project driver * class will populate the list, then invoke various operations * of "ListArrayBased". */ import java.util.Scanner; public class ListDriver { /* * main * * An array based list is populated with data that is stored * in a string array. User input is retrieved from that std in. * A text based...
DESCRIPTION: The purpose of this question is offload processing from the main method to a static helper method. You will be given the main method. Do not alter this code. Your goal is to write a new method called oddOneOut, which will accept a String, and print it in out every other letter. For example, if the String was "abcdefghijk", the oddOneOut method will return "acegik" . METHOD INPUT: A string METHOD PROCESSING: Do not alter the main method. Complete the...
create a new Java application called "CheckString" (without the quotation marks) according to the following guidelines. ** Each method below, including main, should handle (catch) any Exceptions that are thrown. ** ** If an Exception is thrown and caught, print the Exception's message to the command line. ** Write a complete Java method called checkWord that takes a String parameter called word, returns nothing, and is declared to throw an Exception of type Exception. In the method, check if the...
Java, please. Work based on the code above.
DESCRIPTION: The purpose of this question is offload processing from the main method to a static helper method. You will be given the main method. Do not alter this code. Your goal is to write a new method called oddOneOut, which will accept a String, and print it in out every other letter. For example, if the String was "abcdefghijk", the oddOneOut method will return "acegik" METHOD INPUT: • A string METHOD...