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




Have Programming Question? Ask it here!
 
 
 


samar
Jdbc statements
1 Answer(s)      3 years and 11 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
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
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
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
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
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
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
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
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
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 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
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
jdbc  Hai , Give a steps for jdbc connectivity
JDBC
JDBC  why we use batch in jdbc
jdbc
jdbc  display the records using index in jdbc
JDBC
JDBC  How to add set of queries in a single query in JDBC
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  please tell me sir.i dont know JDBC connection and how to create table in database
jdbc
jdbc   how to write program to save data and retrieve data from the form in Java
jdbc
jdbc  why do we need to load jdbc drivers before connecting to database
JDBC
JDBC  how to set classpath for eclipse, java, where to copy jdbc connector
JDBC
JDBC  in class.forname which driver name we are writing for the connection from jdbc to sqlserver 2008
jdbc
jdbc  is it possible to use doget & dopost method with jdbc to call in a servlet programe
Jdbc
Jdbc  A java program with jdbc connectivity with insert,delete,update options for name,regno,mark1,mark2,total
JDBC
JDBC  can u send me the code of jdbc how to join two tables that are in relation
jdbc
at once.CallableStatement.executeBatch() method is used to execute the batch of statements
jdbc
can you explain callable statement interface in details and exp  can you explain callable statement interface in details and exp?   The CallableStatement interface allows the use of SQL statements to call stored
JDBC
JDBC save a data in the database  I need a code to save a data... between java and mysql using JDBC and saves the data into the database. import... con = null; String url = "jdbc:mysql://localhost:3306/"; String db
JDBC
JDBC code to save a data in the database  I need a code to save... the connection between java and mysql using JDBC and saves the data into the database...!"); Connection con = null; String url = "jdbc:mysql://localhost:3306/"; String db
jdbc
how can we set transaction level through jdbc api  how can we set transaction level through jdbc api   Use Connection.setTransactionIsolation(int) to set the desired tansaction level, which takes one of the 5 arguments
jdbc
how can we call stored procedure using jdbc  how can we call stored procedure using jdbc   Call a Stored Procedure using...(); For more information, visit the following link: JDBC call Stored Procedure
jdbc
jdbc  hey sir i just wanna have some ppt on jdbc coz have my exams next week and i have not attended any classes coz of job... I m studyng frm niit
jdbc
jdbc  I can't run my jdbc program because it has error in this line: public static void main(String[] args) the error is:illegal static declaration in inner class would you please let me whats the problem? regards
jdbc
using jdbc connection   import java.sql.*; public class CreateTable... = DriverManager.getConnection("jdbc:odbc:student"); Class.forName
jdbc
jdbc  i had written jdbc connection in method and i need to get connection in another class?   import java.sql.*; class... driver = "com.mysql.jdbc.Driver"; String url = "jdbc:mysql://localhost:3306/test
jdbc
(); Connection conn = DriverManager.getConnection("jdbc:mysql://localhost... information, visit the following link: JDBC Tutorials
jdbc
how can we set transaction level through jdbc api  how can we set transaction level through jdbc api   Use Connection.setTransactionIsolation(int) to set the desired tansaction level, which takes one of the 5 arguments
jdbc
jdbc  how to update int values of ms-access in jdbc program?   In MS Access database, use Number data type for int values. import... =DriverManager.getConnection("jdbc:odbc:access","",""); Statement st=null; st
jdbc - JDBC
Why JDBC   JDBC used for what
JDBC - JDBC
JDBC - limitations of jdbc  What are the limitations of JDBC
JDBC
retrieve the value from database into dropdown list using JDBC SQL 2005  How to retrieve the value from database into dropdown list using JDBC &...").newInstance(); String connectionURL = "jdbc:mysql://localhost:3306/test";; Connection
 

 

 

DMCA.com