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



Home Answers Viewqa JDBC regarding connectivity program only

Have Programming Question? Ask it here!
 
 
 


kishore
regarding connectivity program only
1 Answer(s)      5 years and 11 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
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
database connectivity
database connectivity  how to create database connectivity between HTML and sql server2005
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
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 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  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 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
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
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
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.
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
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
Java connectivity with MySQL
Java connectivity with MySQL  Java connectivity with MySQL
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
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
in connectivity - Hibernate
insertted  Hi friend, This is connectivity and hibernate configuration
DB connectivity - EJB
DB connectivity  DB connectivity
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 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
connectivity - JUNIT
connectivity  /********************************************************** * Program to create GUI for ATM Simulation
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
Database Connectivity Withe Oracle
Database Connectivity Withe Oracle  Develop a program to perform the database driven operation like insert, Delete, Update and select. To perform the above operations create one table named Employee. Field Name Field Type EmpId
Query regarding JSP, JDBC
Query regarding JSP, JDBC  can I get the code for the question asked by me regarding JSP,JDBC
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
regarding jdbc - JDBC
regarding jdbc  how i can configure java with ms access
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
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
Oracle Database connectivity probem
Oracle Database connectivity probem  hi Below is the code of oracle database connectivity, when i compile it, it will show the error...\classes12.zip;E:\oracle\ora81\jdbc\lib\ojdbc14.zip;C:\Program Files\Apache Software
Validate telnet connectivity
Validate telnet connectivity  How to validate telnet connectivity in my java code
sql connectivity through java
sql connectivity through java  i want an example for java db through sql connection. Thanks in advance
regarding JTable - JDBC
regarding JTable  how to populate a JTable with mysql data after clicking JButton please explain with the example
Advertisements
 

 

 

DMCA.com