Rewrite the example shown in Figure 8-5 using VB.NET. import java.sql.*; public class TestJDBC { public static
Question:
Rewrite the example shown in Figure 8-5 using VB.NET.
Transcribed Image Text:
import java.sql.*; public class TestJDBC { public static void main(String[] args) { try { Driverd = (Driver)Class.forName("oracle.jdbc.driver.OracleDriver").newlnstance( ); System.out.println(d); DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver( );L Connection conn = Register the driver to be used. Identify the type of driver to be used. DriverManager.getConnection ("jdbc:oracle:thin:@durga.uits.indiana.edu:1 521:OED1", args[O], args[1]); Open a connection to a database. Create a Statement variable that can Statement st = conn.createStatement( ;< ResultSet rec = st.executeQuery("SELECT * FROM Student"); while(rec.next( )) { System.out.println(rec.getString("name"):) conn.close( );< be used to issue queries against the database Issue a query and get a result. catch (Exception e) { System.out.printin("Error – " + e); Process the result, one row at a time. Close the connection.
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 64% (14 reviews)
Dim conn As New OracleConnection Dim cmdQuery As String connConnectionString User I...View the full answer
Answered By
Joseph Njoroge
I am a professional tutor with more than six years of experience. I have helped thousands of students to achieve their academic goals. My primary objectives as a tutor is to ensure that students do not have problems while tackling their academic problems.
4.90+
10+ Reviews
27+ Question Solved
Related Book For
Modern Database Management
ISBN: 978-0133544619
12th edition
Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi
Question Posted:
Students also viewed these Computer Sciences questions
-
Rewrite the example shown in Figure 8-4 using Java.
-
Create the tables. (Use the MS Access example shown in Figure P8.1 to see what table names and attributes touse.) Database name: Ch08 SimpleCo Table name: CUSTOMER Table name: INVOICE CUST NUM CUST...
-
Consider the cross-country example shown in Figure 3. 17. How big would the window size have to be for the channel utilization to be greater than 95 percent? Suppose that the size of a packet is...
-
Analyze the residuals from the regression model on the patient satisfaction data from Exercise 4.49. Comment on the adequacy of the regression model. MTB> Stat> Regression > Regression Normal...
-
According to the American Time Use Survey, adult Americans spent 42.6 minutes per day on phone calls and answering or writing email in 2006. (a) Suppose that we want to judge whether the amount of...
-
Accompanying a bank statement for Borden Company is a credit memo for $21,200 representing the principal ($20,000) and interest ($1,200) on a note that had been collected by the bank. The company had...
-
If the probability is 0.20 that a downtime of an automated production process will exceed 2 minutes, find the probability that 3 of 8 downtimes of the process will exceed 2 minutes using (a) the...
-
The net income (after income tax) of McCants Inc. was $2 per common share in the latest year and $6 per common share for the preceding year. At the beginning of the latest year, the number of shares...
-
Pelican Paint Maufacturers, Inc. uses process costing for its mixing department. It mixed 5 , 0 0 0 units of paint during the period and has 6 0 0 are still being processed ( ending WIP ) in the...
-
Based on the data below, complete Pro Forma Financial Statements (Based on regression analysis, your company has determined that it has an annual sales growth of 6% per year) Net Sales = $800,000...
-
Discuss some of the languages that are associated with Internet application development. Classify these languages according to the functionality they provide for each application. It is not necessary...
-
Consider the example code shown in Figure 8-10. Assume that instead of accessing data from a local server, you are going to access data from a cloud provider that offers the appropriate application...
-
Spencer Software Company has assets of $1,020,000 and liabilities of $552,000. a. Prepare the owners' equity section of the company's balance sheet under each of the following independent...
-
Although there is still a mentality that pays benefits are the main source of motivation in many companies, Taylor's view has been cast aside and there are already many managers who say that "pay is...
-
What is Adam Smith's invisible hand idea all about? Why is there a spontaneous order that comes out of the pricing system (according to Smith)? Why did Smith think that banking needed to regulated?...
-
1. Explain the Law of Diminishing Returns. To do that: a) Consider all pertinent variables to include in your analysis. b) Provide data and graphs to support your answer(s). 2. Discuss the nature of...
-
Check out PISA and your textbook for data relating to the expenditures on education per country. There are different sectors of education that receive funding. Why are there differences in the amount...
-
(a) The following are the amount of time, in minutes, which it took a random sample of 20 technicians to perform a certain task: 18.1 20.3 18.3 15.6 22.5 16.8 17.6 16.9 18.2 17.0 19.3 16.5 19.5 18.6...
-
Graph the function. y = (x + 1) 2/3
-
31. What is the income that can be received over 15 years from $500,000 earning 6% annually? 32. What is the semiannual payment required to retire $50,000 in debt over 5 years at 8% compounded...
-
1. List the names of all customers that have a credit limit less than $10,000. 2. List the descriptions of all parts in item class AP and located in warehouse number 3. 3. List the order numbers for...
-
1. List the name of each publisher thats not located in New York. 2. List the title of each book published by Penguin USA. 3. List the title of each book that has the type MYS. 4. List the title of...
-
1. List the owner number, last name, and first name of every boat owner. 2. List the names of all boats that are stored in a slip with a length of less than 30 feet. 3. List the last name, first...
-
What strategies might you use to implement the personal change needed to support organizational change? What is the relevance of unity consciousness in organizational leadership, communications, and...
-
Recognizing the literature (and its limitations) for conveying policing organization, management, and change - what management/organizational changes are needed in policing today? Why? How do we set...
-
How do organizations effectively navigate the complexities of organizational change, integrating advanced change management methodologies to mitigate resistance and foster sustainable transformation?
Study smarter with the SolutionInn App