regarding connectivity program only

regarding connectivity program only

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
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
C Program with Database Connectivity
C Program with Database Connectivity  How To Connect MySQL Database in C Program with Graphics
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
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
**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
regarding rev
regarding rev  write a prog. in java that display all the arguments passed at the command line in reverse order
Regarding repository
Regarding repository  How to check in and check out using SVN repository using eclipse
ModuleNotFoundError: No module named 'connectivity'
ModuleNotFoundError: No module named 'connectivity'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'connectivity' How to remove the ModuleNotFoundError: No module named '
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
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
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
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
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 javascript
Regarding javascript  Hi, I want 4 upload buttons in HTML CODE and Among 4 browse buttons user is not selected any one then provide a prompt message like plz select any 1 file among 4 buttons.If user is selected either 1st
regarding java - JDBC
regarding java  i am making a project on supply chain system i have... will be directly saved in the database i have seen many examples regarding... give some give some examples regarding this please help me regarding
regarding jtable...
regarding jtable...  sir, im working with jtables. i wanted to populate a jtable from the database and when i click any row it should add a container below that row itself and show the required details of the row
regarding jdbc - JDBC
regarding jdbc  how to connect mysql with java example you have...; use this code for connection in ur program Connection con = null; try...(); } this code for getting connection only. After getting connection we
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
Java connectivity with MySQL
Java connectivity with MySQL  Java connectivity with MySQL
JDBC - Java Database Connectivity Tutorial
JDBC - Java Database Connectivity Tutorials   ... Database Connectivity or in short JDBC  is a technology that enables the java program to manipulate data stored into the database. Here is the complete
regarding socket - Development process
regarding socket  sir I have a project of socket. which takes input from user(client) and checks in database(server) and sends the responses to client but I am facing problem this connection maintains for only single thread
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
Query regarding JSP, JDBC
Query regarding JSP, JDBC  can I get the code for the question asked by me regarding JSP,JDBC
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
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 jdbc - JDBC
regarding jdbc  how i can configure java with ms access
ModuleNotFoundError: No module named 'spectral-connectivity'
ModuleNotFoundError: No module named 'spectral-connectivity'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'spectral-connectivity' How to remove the ModuleNotFoundError
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 CONNECTIVITY
file in environment variable.   Java Mysql connectivity Other JDBC
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
DB connectivity - EJB
DB connectivity  DB connectivity
connectivity
connectivity
connectivity
ModuleNotFoundError: No module named 'only'
ModuleNotFoundError: No module named 'only'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'only' How to remove the ModuleNotFoundError: No module named 'only' error
help regarding variable types and its modifiers
help regarding variable types and its modifiers  static variable is initialized once only and can be used by all objects. i want static in sense of program execution i want to count how many times the said program is executed
regarding header files - Spring
regarding header files  i am working on linux platform. i a using spring framework 2.5.4.while comlinig the client program i.e from demo which given in tutorial. error is these two package does not exist import
query regarding arraylist
query regarding arraylist  i m using sql server + jsp to develop my program. i have a problem of fetching data from the table in database. i m storing my keys in arraylist, now i want to get data according to that keys. keys
oracle connectivity problem with netbeans
oracle connectivity problem with netbeans  sir I am using oracle.... for this after adding new driver(ojdbc6.jar) in services tab I got connectivity with oracle since I execute statement directly from net bean but now I am preparing a program
Regarding project - Applet
Regarding project  hi friend , iam doing project in Visual cryptography in Java so i need the Help regarding how to make a share of a original imahe into shares anu
Regarding weblogic portal
Regarding weblogic portal  Hi, My name is Ramanuja.i am working on weblogic portal.if u know any info regarding plz provide the materials or information to me.plz help me. Thanks in advance
regarding JTable - JDBC
regarding JTable  how to populate a JTable with mysql data after clicking JButton please explain with the example
regarding tags - Struts
regarding tags  What is the difference between html:submit and nested:submit and usage of tags based on the situation
regarding struts 2
regarding struts 2   is it not possible to get values from applicationresources.properties into our application in struts 2

Ads