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



Home Answers Viewqa JDBC regarding connectivity program only
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


kishore
regarding connectivity program only
1 Answer(s)      6 years and 4 months ago
Posted in : JDBC



Advertisement
View Answers

May 31, 2008 at 8:13 PM


Hi friend,

i am sending simple code of connectivity

import java.sql.*;

public class DatabaseConnect{
public static void main(String[] args) {
System.out.println("MySQL Connect Example.");
Connection con = null;
String url = "jdbc:mysql://192.168.10.211:3306/";;
String db = "amar";
String driver = "com.mysql.jdbc.Driver";
String userName ="amar";
String password="amar123";
try {
Class.forName(driver).newInstance();
con = DriverManager.getConnection(url+db,userName,password);
System.out.println("Connected to the database");
con.close();
System.out.println("Disconnected from database");
} catch (Exception e) {
e.printStackTrace();
}
}
}


-----------------------------------------

Read for more information.

http://www.roseindia.net/jdbc/


Related Tutorials/Questions & Answers:
regarding connectivity program only - JDBC
regarding connectivity program only  can u give me code regarding .. that i had created student data base with his name and subject marks resp ... i use html in front end ...that there r options like 1.name---------- 2.sub1
regarding connectivity program only - JDBC
regarding connectivity program only  can u give me code regarding .. that i had created student data base with his name and subject marks resp ... i..., i am sending simple code of connectivity import java.sql.*; public
Advertisements
C Program with Database Connectivity
C Program with Database Connectivity  How To Connect MySQL Database in C Program with Graphics
Regarding Login application program
Regarding Login application program  Hi this is shiva. iam writing a small login form using struts1.3.10 version. once iam submit the login button it shows NULLPointer Exception. I write a SOP Statement in ActionClass
Opening a browser only with body from a java program
Opening a browser only with body from a java program  Hi all, I got following requirement, Opening a browser window only with body and title bar. And based on some condition, after some time, i have to close the browser window
database connectivity
database connectivity  describe java program steps in order to get connectivity to database along with example
connectivity problem
connectivity still i am facing this error* ================================oracle connectivity program============================ import java.sql.*; import...connectivity problem  i am facing error in Class.for name statement
**Connectivity is not getting done in this program plz check it out wat is the problem with that Although i've made tables in MA-ACCESS**
**Connectivity is not getting done in this program plz check it out wat is the problem with that Although i've made tables in MA-ACCESS**  <p>import java.io.*; import java.awt.*; import java.awt.event.*; import
database connectivity
database connectivity  how to create database connectivity between HTML and sql server2005
connectivity with php
connectivity with php  i have make one html form and doing connectivity with php database but when i click on submit button on html form display all coding in php form about connectivity instead of adding data, i used in html
Regarding Datasource
Regarding Datasource  Hi friend, Good morning,how r u,i want to share 1 information to u,I got a job in VERIZON DATA SERVICES INDIA PVT.LTD,u help a lot when i am in academic project,with that project only i got a job
java connectivity
java connectivity  hi........ Can u help me to do connectivity between java and weka??????? weka is a data mining tool which allows to do prediction, classification etc.... i want to do connectivity between weka and java can u
JDBC CONNECTIVITY
; } } "is the program with database created and compilation is sucessful...) at java.lang.ClassLoader.loadClass(Unknown Source) Could not find the main class: A. Program will exit... connectivity Other JDBC Tutorials
Regarding repository
Regarding repository  How to check in and check out using SVN repository using eclipse
regarding rev
regarding rev  write a prog. in java that display all the arguments passed at the command line in reverse order
Java connectivity with MySQL
Java connectivity with MySQL  Java connectivity with MySQL
connectivity step
connectivity step  sir.pls give me step one by one for connect the java program to oracle.   Follow these steps: 1) Import the following packages in your java file:*** import java.sql.*; import oracle.jdbc.driver.
regarding project
regarding project  OBJECTIVES OF THIS PROJECT: -Ability to test... answers. -Ability of the programmer to definitely write a work program. -Deliver quality code, ie not just working program but also ensure that the program performs
regarding project
regarding project  OBJECTIVES OF THIS PROJECT: -Ability to test... the relevant answers. -Ability of the programmer to definitely write a work program. -Deliver quality code, ie not just working program but also ensure
connectivity with mysql
connectivity with mysql  if this code of roseindia doesnt work,then what to do..cant connect with my sql http://www.roseindia.net/tutorial/php/phpdatabase/Check-PHP-MySQL-Connectivity.html   Please visit the following
JDBC CONNECTIVITY
file in environment variable.   Java Mysql connectivity Other JDBC
connectivity with access
connectivity with access  how to connect with data base with access sheet. in my application form there is two JTextArea and Two JComboBox.   Is this Access database or excel sheet. Do you want to display the values
JDBC - Java Database Connectivity Tutorial
JDBC - Java Database Connectivity Tutorials       Java Database Connectivity or in short JDBC  is a technology that enables the java program to manipulate data
regarding project
regarding project   sir we need help about project. we have idea... program. -Deliver quality code, ie not just working program but also ensure that the program performs well at high performance (ie many multiple request
Regarding Project
Regarding Project  sir, i am doing a project in java. my project is CITY GUIDE it is an web application. please give me documentation of my project
Regarding Project
Regarding Project  sir, i am doing a project in java. my project is CITY GUIDE it is an web application. please give me documentation of my project
Regarding Hibernate
Regarding Hibernate  Both JDBC and Hibernate are used to connect to database then whats the need of going to hibernate? What are the main differences? And could you let me know please
in connectivity - Hibernate
insertted  Hi friend, This is connectivity and hibernate configuration
Advertisements
 

 

 

DMCA.com