January 31, 2009 at 1:38 AM
Hi
I am sending code, it will help you to understand the connection from sql server database table.
import java.sql.*;
public class Test {
public Test() throws Exception {
DriverManager.registerDriver(new com.microsoft.jdbc.sqlserver.SQLServerDriver());
Connection connection = DriverManager.getConnection("jdbc:microsoft:
sqlserver://<Host>:1433",<"UID>","<PWD>";);
if (connection != null) {
System.out.println();
System.out.println("Successfully connected");
System.out.println();
DatabaseMetaData meta = connection.getMetaData();
System.out.println("\nDriver Information");
System.out.println("Driver Name: " + meta.getDriverName());
System.out.println("Driver Version: " + meta.getDriverVersion());
System.out.println("\nDatabase Information ");
System.out.println("Database Name: " + meta.getDatabaseProductName());
System.out.println("Database Version: "+ meta.getDatabaseProductVersion());
}
}
public static void main (String args[]) throws Exception {
Test test = new Test();
}
}
Thanks..
Related Tutorials/Questions & Answers:
Cmp Bean - EJBCmp Bean I want to create connection pool in admin console in sun app server
the data base is sql server, I gave the resource type is javax.sql.DataSource, and the datasource class name is came automatically
called
Chapter 7. CMP Entity Bean Life Cycle
Chapter 7.
CMP Entity
Bean Life CyclePrev Part ...;
CMP Entity
Bean Life CycleIdentify
correct and incorrect statements or examples about the life cycle of
a
CMP entity
bean Advertisements
From a list, identify the purpose, behavior, and responsibilities of the bean
provider for a CMP entity bean, including but not limited to:
setEntityContext, unsetEntityContext,
ejbC of the
bean
provider for a
CMP entity
bean, including but not limited...,
ejbFind, ejbHome, and ejbSelect.
Prev Chapter 7.
CMP Entity
Bean...
provider for a
CMP entity
bean, including but not limited
Identify the use, syntax, and behavior of, the following entity bean home
method types, for Container-Managed Persistence (CMP);
finder methods, create methods, remove methods, and home me bean home
method types, for Container-Managed Persistence (
CMP... the use, syntax, and behavior of, the following entity
bean home
method types, for Container-Managed Persistence (
CMP);
finder methods, create
ModuleNotFoundError: No module named 'cmp'ModuleNotFoundError: No module named '
cmp' Hi,
My Python program is throwing following error:
ModuleNotFoundError: No module named '
cmp'
How to remove the ModuleNotFoundError: No module named '
cmp' error
ModuleNotFoundError: No module named 'cmp_dict'ModuleNotFoundError: No module named '
cmp_dict' Hi,
My Python program is throwing following error:
ModuleNotFoundError: No module named '
cmp_dict'
How to remove the ModuleNotFoundError: No module named '
cmp_dict
ModuleNotFoundError: No module named 'cmp_dict'ModuleNotFoundError: No module named '
cmp_dict' Hi,
My Python program is throwing following error:
ModuleNotFoundError: No module named '
cmp_dict'
How to remove the ModuleNotFoundError: No module named '
cmp_dict
BeanBean what is
bean? how to use
bean
HTML Code:
Contents
MOBILE STORE
HOME
PRODUCTS
IMAGES
COMPANY
BRANCHES
DEALERS
FEEDBACK
Username
Password
entity beanentity bean can any one tell me how to develop and execute ---------- j2ee entity beans (
cmp,bmp) example in weblogic server with (netbeans.../ejb/entity-
bean-example.shtml
Java BeanJava Bean How to run java
bean program in Netbeans
Java BeanJava Bean What is a Java
Bean?
A Java
Bean is a software component that has been designed to be reusable in a variety of different environments
Java BeanJava Bean What is Java
Bean?
I got my answer already here: http://www.roseindia.net/jsp/usingbeansinjsp.shtml
Thanks a lot
bean objectbean object i have to retrieve data from the database and want to store in a variable using rs.getString and that variable i have to use in dropdown... java.util.*;
public class
Bean {
public List dataList(){
ArrayList list=new
Session Bean is a Session
bean
A session
bean is the
enterprise
bean that directly.... A session
bean represents a single client
accessing the enterprise application.... A session
bean makes an interactive session only
for a single client and shields
bean area - SQLbean area how to print
bean area in excel sheet from oracle forms
JSF Manage Bean JSF Manage
Bean how to register JSF manage
bean? Please give me an example.
Thanks!
JSF Manage
Bean Example
Spring bean annotation exampleSpring
bean annotation example Hi,
How to configure
Bean using... to configure it. If you have a
bean with following definition:
package net.roseindia...(){
System.out.println("Hello");
}
}
Now to configure it as
Bean you can use the @
Bean bean - JSP-Interview Questionsbean what is use
bean in jsp? Hi Friend,
Please visit the following links:
http://www.roseindia.net/jsp/using-
bean-counter.shtml
http://www.roseindia.net/jsp/java-
bean-example-jsp.shtml
Hope
Java Bean PropertiesJava
Bean Properties What are the properties of a normal java
Bean(Not EJB)
HI Friend,
Please visit here:ADS_TO_REPLACE_1
http://www.roseindia.net/jsp/usingbeansinjsp.shtml
Thanks
JAVA BEAN WITH ORACLE FORMSJAVA
BEAN WITH ORACLE FORMS Hi..I am doing my final year Project.. I need the ste-by-step procedure to integrate a
bean with oracle forms? Please help me
message driven bean examplemessage driven
bean example can any one tell me how to develop and execute ---------- j2ee message driven
bean example in weblogic server with (netbeans or eclipse).
Have a look at the following link:
http
Session Bean ExampleSession
Bean Example I want to know that how to run ejb module by jboss 4.2.1 GA (session
bean example by jboss configuration )?
Please visit the following link:
http://www.roseindia.net/javabeans
Stateless Bean ErrorStateless
Bean Error Ejb stateless
bean giving following error,please help me.
11:49:54,894 INFO [STDOUT] Error:$Proxy72 cannot be cast... are providing you a link that will illustrate you more clearly about Stateless
Bean java bean - EJBjava bean difference between java
bean and enterprice java bean first of all dont compare java
bean with enterprise java
bean because enterprise java
bean is a techonology where we can develope business logic
java bean code - EJBjava
bean code simple code for java beans Hi Friend... the Presentation logic. Internally, a
bean is just an instance of a class.
Java
Bean Code:
public class EmployeeBean{
public int id;
public
Java Bean - Java BeginnersJava Bean Sir,
How can i add a java
bean into a target GUI....
Thanking you
Pabitra Kr Debanth.
Hi friend,
Java
Bean classes must..., it will be a visible Java
Bean. Java Beans may also be invisible