hi all
i need help to connect to sql ser4ver usng jsp
i m using sql server 2000,i installed Microsoft SQL Server 2000
Driver for JDBC in my system....
i placed all jar files in class path....
when try to run my applicatio i m getting following error:
java.lang.ClassNotFoundException: com.microsoft.jdbc.SQLServerDriver
my code is :
<%@ page import = "java.io.*" import = "java.lang.*"
import = "java.sql.*" %>
<%
out.println("<h2>Successfully logged in</h2>");
try
{
Class.forName("com.microsoft.jdbc.SQLServerDriver" );
Connection con=DriverManager.getConnection
("jdbc:host://localhost:8080/ravi","srinivas","sa""sa");
Statement st = con.createStatement();
String sql="INSERT INTO ravi1 VALUES ('Michael', 'dba', '90000' )";
st.executeUpdate(sql);
}
5 2649
hi all
i need help to connect to sql ser4ver usng jsp
i m using sql server 2000,i installed Microsoft SQL Server 2000
Driver for JDBC in my system....
i placed all jar files in class path....
when try to run my applicatio i m getting following error:
java.lang.ClassNotFoundException: com.microsoft.jdbc.SQLServerDriver
my code is :
<%@ page import = "java.io.*" import = "java.lang.*"
import = "java.sql.*" %>
<%
out.println("<h2>Successfully logged in</h2>");
try
{
Class.forName("com.microsoft.jdbc.SQLServerDriver" );
Connection con=DriverManager.getConnection
("jdbc:host://localhost:8080/ravi","srinivas","sa""sa");
Statement st = con.createStatement();
String sql="INSERT INTO ravi1 VALUES ('Michael', 'dba', '90000' )";
st.executeUpdate(sql);
}
Just to make sure, you have either included the the jdbc .jar file with the program, or added it to your classpath, correct? What what environment are you using?
Also, in your code: -
("jdbc:host://localhost:8080/ravi","srinivas","sa""sa"); // is there a reason you have 'sa' in there twice in quotes? (Is "sasa" your passwd, or is it just "sa"?)
-
Just to make sure, you have either included the the jdbc .jar file with the program, or added it to your classpath, correct? What what environment are you using?
Also, in your code: -
("jdbc:host://localhost:8080/ravi","srinivas","sa""sa"); // is there a reason you have 'sa' in there twice in quotes? (Is "sasa" your passwd, or is it just "sa"?)
-
And also just to add that all this should really have been taking place in the Java forum
Banfa 9,065
Expert Mod 8TB
And now it is :D
And I have also given the thread a more meaningful name.
And now it is :D
And I have also given the thread a more meaningful name.
Thanks Banfa. I hope the OP's problem was resolved.
i think you should add ojdbc14.jar or at least classes12.jar in the libraries.
then probs will be solved
Sign in to post your reply or Sign up for a free account.
Similar topics
by: JShurmatz |
last post by:
If anyone can shed some light on this problem I would greatly
appreciate it.
I am unsuccessfully trying to use a database connnection retrieved
from a pool configured using Java System Web...
|
by: Nils Valentin |
last post by:
Hi MySQL Fans ;-),
Is it possible that the 3.08 series allows to connect to 4.0.14 versions but
not to the 4.1 alpha-versions ?
I get belows error when tryig to connect from DbVisualizer which...
|
by: Robert Mazur |
last post by:
MySQL 5.0 alpha (binary install) on
Solaris 9 -or- RedHat 8.0
mysql-connector-java-3.0.8-stable
-----------------------
Is there something different going on with JDBC and the alpha version...
|
by: Marc Stiegele |
last post by:
Hello,
I have a problem with the IBM DB2 UDB XML Extender. I`m working on a
iSeries 400 server (AS/400, V5R1) with a
integrated DB2 (my client is NT 4.0 Service Pack 1 with JDK1.1.8). I
want to...
|
by: Steffen |
last post by:
hi there,
i have a problem connecting to a db2 database 7.2.4 on AIX using java
when running the javacode on AIX using jdk1.3.1.
The classpath is correctly set to java12/...
on windows the...
|
by: kommaraju |
last post by:
iam a starter to db2 & jdbc.i have a servlet program which connects to ibm db2
using jdbc.when i run this using apache tomcat 4.1.34 , it is showing a
error message of HTTP STATUS 500
my jdbc...
|
by: %NAME% |
last post by:
When using embedded SQL for db2 under solaris, you do not need to give
username and password since the system will use your unix-login as
default credential. However, with JDBC seems I always need...
|
by: bevis |
last post by:
I'm new to sql server and mysql but this seems like it should be a pretty straight forward jdbc connection. But I have spent almost 2 days just trying to get a jdbc connection. Please help if you...
|
by: Anoop |
last post by:
Is it true that there are no type 4 jdbc drivers to connect to a DB2
server v7.1? The DB2 server is hosted on ACF2 (OS/390). We would be
connecting from windows and solaris boxes.
If it is true,...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |