Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


samar
Jdbc statements
1 Answer(s)      4 years and 2 months ago
Posted in : Java Interview Questions


what type of a method is get Connection ()?

Advertisement
View Answers

October 29, 2010 at 10:54 AM


Hello,

Its getConnection() method is used to establish a connection to a database. It uses a username, password, and a jdbc url to establish a connection to the database and returns a connection object. A jdbc Connection represents a session/connection with a specific database.

This method creates a Connection object, which is used to create SQL statements and takes a String containing a database connection URL.

Thanks.



Related Tutorials/Questions & Answers:
Jdbc statements
Jdbc statements  what is the use of Callable Statement
Jdbc statements
Jdbc statements  what type of a method is get Connection
Advertisements
creating jdbc sql statements - JDBC
creating jdbc sql statements  I had written the following program...=DriverManager.getConnection("jdbc:odbc:second"); stmt=con.createStatement...)   Hi friend, i think, connection problem. i am sending jdbc
Statements in JDBC - Java Interview Questions
Statements in JDBC  Hi, Explain statement, preparedstatement, callable statement. which is best and why. when to use preparedstatement. plz dont give link . explain ur words with example
JDBC: Insert Record using Prepared Statements
JDBC: Insert Record using Prepared Statements In this section, you will learn how to insert row using Prepared Statements. Insert Record  ... times for different values. It is precompiled SQL Statements which are stored
predicates and statements?
predicates and statements?  Explain about predicates and statements
DECESION MAKING STATEMENTS
DECESION MAKING STATEMENTS  The Decision Making statements may be implemented in different forms depending on the complexity of the condition to be tested. Describe various forms of decision making statements in java
The INSERT INTO Statements in SQL?
The INSERT INTO Statements in SQL?  The INSERT INTO Statements in SQL?   Hi, The INSERT INTO statement is used to insert a new row or multiple rows into a table. SQL INSERT INTO Syntax INSERT INTO table_name VALUES
general syntax for a SELECT statements
general syntax for a SELECT statements  Write down the general syntax for a SELECT statements covering all the options   Hi, The general... shows how we can use different optin with the select statements. SELECT select
What is the Delete Statements in SQL?
What is the Delete Statements in SQL?  What is the Delete Statements in SQL?   Hi, Here is the answer, Delete statement in SQL is used to delete partial/all data. Especially delete statement is useful in case
Using Select Statements in JDBC
Using Select Statements in JDBC   ... is concern with Select Statements. You have to just create the connection...; Connection con = null;  String url = "jdbc:mysql://localhost
jdbc
jdbc define batch updates  define batch updates?exp   JDBC batch update is a collectively called when a group of SQL statements... links: http://www.roseindia.net/jdbc/Jdbc-batch-update.shtml http
Executing Set of SQL statements in Java
Executing Set of SQL statements in Java  Hi, I am trying to execute..."); conn=DriverManager.getConnection("jdbc:odbc:drivername", "uid", "pwd...= cstmt.executeQuery(); The procedure has drop temp table statements, select multiple
Avoiding â??!= nullâ?? statements in Java?
Avoiding ‚??!= null‚?? statements in Java?  Avoiding ‚??!= null‚?? statements in Java
jdbc
a connection is created by using the JDBC, then by default it is in auto- commit mode... where you want to execute a batch of statements, either they should commit at on go... of statements will be rollback, without committing
Java Control Statements
Java Control Statements       Introduction to Control Statements In this section, we are going to discuss the control statements. Different types of control statements
Java Control Statements
Java Control Statements     ... the control statements. Different types of control statements: the decision making statements (if-then, if-then-else and switch), looping statements (while, do-while
JDBC Transaction Example
; } JDBC Transaction Example JDBC Transaction  JDBC transaction... successfully. When  you create a connection using JDBC, by default... connectionUrl = "jdbc:mysql://localhost:3306/"; String databaseName
Hibernate generated SQL statements on console
Hibernate generated SQL statements on console  If you want to see the Hibernate generated SQL statements on console, what should we do?   If you want to see the Hibernate generated SQL statements on console just add
jdbc
logical group of data with a number of columns. JDBC ResultSet Example Stored Procedure: A stored procedure is a named group of SQL statements that have been
java program using control statements...
java program using control statements...  public class ControlStatements { public static void main(String args[]){ int x=10; if(x==0){ System.out.println("It is zero"); else if(x>0) System.out.println
Objective C if else statements syntax
Objective C if else statements syntax  What is the syntax of if else statements in Objective C?   Using of if else statement in Objective C There is no changes in the syntax format of if else statement. You can write
jdbc
jdbc  Hai , Give a steps for jdbc connectivity
jdbc
jdbc  display the records using index in jdbc
JDBC
JDBC  why we use batch in jdbc
JDBC
JDBC  How to add set of queries in a single query in JDBC
JDBC
JDBC  can u send me the code of jdbc how to join two tables that are in relation
Jdbc
Jdbc  A java program with jdbc connectivity with insert,delete,update options for name,regno,mark1,mark2,total
jdbc
jdbc  is it possible to use doget & dopost method with jdbc to call in a servlet programe
JDBC
JDBC  in class.forname which driver name we are writing for the connection from jdbc to sqlserver 2008
JDBC
JDBC  how to set classpath for eclipse, java, where to copy jdbc connector
 

 

 

DMCA.com