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



Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Ragini Shukla
Db
1 Answer(s)      6 years ago
Posted in : Java Beginners



Advertisement
View Answers

November 15, 2008 at 3:49 AM


Hi Ragini,


Please check this code.


public boolean connect() throws ClassNotFoundException,SQLException{
Class.forName(dbDriver);
dbCon = DriverManager.getConnection(dbURL,userid,password);
return true;
}


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

Thanks.

Amardeep


Related Tutorials/Questions & Answers:
DB Insert
DB Insert  How to insert XML data into a database column? Column data type is CLOB
db
Advertisements
db
db connectivity
db connectivity  hi i am beginner in objective c lang and having knowlwgde of basic syntax of this lang and need statements that can be used to connect to sqlite. please do send me the simple example code. i am using GNUstep
DB connectivity - EJB
DB connectivity  DB connectivity
j2me with derby db - MobileApplications
j2me with derby db  Hello, Presently Iam working on the j2me(wireless toolkit2.0).I have done so many applns in j2me,but I want to install derby db in j2me.I am new to derbydb. Can u tell me briefly abt derby db,which version
Zend Db error - WebSevices
Zend Db error  Hello friends, How i get the values from the database using zend framework Any one know the code. Help me
about db - Struts
About DB in Struts  I have one problem about database. i am using netbeans serveri glassfish. so which is the data source struts config file should be? Please help me
getting db in action class
getting db in action class  hi, Am usin struts in ma application... n i need to interact with the db .. so i used.. getDataSource(request) but it gives me an error.. java.lang.NoSuchMethodError: LoginAction.getDataSource(Ljavax
ERRor in executing DB program
ERRor in executing DB program  While executing following code an Error was generated.can any one help me for this. LiveDB liveDBObj = DataSourceFactory.getLiveDBInstance(); PreparedStatement pstmt=null; String qry=""; qry
JSP,DB,SERVLET
JSP,DB,SERVLET  I have a jsp page with 3 text fields name,age ,city.i populated these datas into a database table.I have another jsp page with 4 fields name, city , age and phone.Once the user enter the name, city and age should
Server DB connection - JDBC
Server DB connection  Hello Guys I want to connect two databases at the same time but it looks like the java is only picking up the second database. One database is on my localhost and the other one is on server, I want
how to migrate java db to mysql
how to migrate java db to mysql  I have an aplication,for migrating java db to mysql db.how it will done
Aggregrate function Max() in db
Aggregrate function Max() in db  Hi everyone i have a question and stuck with this problem. i have a table like Brand in mySql db where brandid(varchar) is generating automatically.. im having a Db connection class and a method
db error - Java Beginners
db error  Hi, how to insert text area content into database...://192.168.10.126/"; String db = "roseindia"; String driver = "com.mysql.jdbc.Driver...(driver); con = DriverManager.getConnection(url+db, user, pass
DB Schema Viewer
DB Schema Viewer       DB Schema Viewer is an Eclipse plugin that builds a graphical view of an existing database. Reverse Engineering is performed through JDBC
JSP,DB,SERVLET
JSP,DB,SERVLET  hi thank you for your reply.With this code i can insert the data successfully into database but In ajax.jsp once i give the name;;;age and city are not automatically fetched......instead sumthing get filled
JSP,DB,SERVLET
JSP,DB,SERVLET  hi thank you for your reply.With this code i can insert the data successfully into database but once i give submit button in insert.jsp it should be forwarded to ajax.jsp.In ajax.jsp once i give the name;;;age
JSP,DB,SERVLET
JSP,DB,SERVLET  I have a jsp page called page1.jsp with 3 text fields name,phone ,city.i populated these datas into a database table through servlet (page1servlet.java) and bean(page1bean.java).I have another jsp page(display.jsp
Java DB
Java DB       Java DB is an open source Apache Derby database supported by Sun. Java DB is completely written in the Java programming language having the functionality write once run
Java and DB - Java Interview Questions
Java and DB   What is the difference between database null and Java null
Function mysql_db_query() is deprecated
Function mysql_db_query() is deprecated  Hi, In latest version of PHP Function mysqldbquery() is deprecated. What could be the solution? Thanks
Function mysql_db_query() is deprecated
Function mysql_db_query() is deprecated  Hi, In latest version of PHP Function mysqldbquery() is deprecated. What could be the solution? Thanks
DB Visual Architect for Eclipse
DB Visual Architect for Eclipse       Extensive Database Coverage DB Visual ARCHITECT... developers and DB administrators can create diagrams much faster than any tool
How to threow timeout exception when DB is not responding
How to threow timeout exception when DB is not responding  How to throw timeout exception when DB is not responding
Entity DB design pattern - Java Interview Questions
Entity DB design pattern  I want the information for Entity DB design pattern
How to threow timeout exception when DB is not responding
How to threow timeout exception when DB is not responding  How to throw timeout exception when DB is not responding
same thing i want but from db..
same thing i want but from db..  http://www.roseindia.net/tutorial/javascript/dynamicCombo.html same thing i want but from db
View Photo From Db MySql
View Photo From Db MySql  Good Morning Sir, Please help me, I make a small code but i have a error. I want to make viewer photo from database MySql into my project in netbeans. this is my code : try
JAVA DB connenting Office access..
JAVA DB connenting Office access..  hai friends....iam shackir.. i did 1 program to connect OfficeAccess...in this program everything except insertions are working fine...i cant understand what is the problem..."ANY ONE PLEASE
how to featch data form db?
how to featch data form db?  how to featch data form db?   /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package com.tcs.ignite.app.servlets; import
 

 

 

DMCA.com