Changing JAVA Oracle connection to MS SQL

C

crab.dae

Need some help.....

Below is what I currently have that's written in JAVA to connect to
Oracle, but I need to change it to connect to MS SQL.

===========

private void dbInit()
{
dbUrl = "jdbc:eek:racle:thin:mad:" + paramServerIP + ":3500:" +
paramDbSID;
try
{
Class.forName("oracle.jdbc.driver.OracleDriver");
}
catch(Exception eDriver)
{
failedDialog("Driver failed!", eDriver.getMessage());
}
}

private void dbOpen()
{
if(paramServerIP.indexOf("datadev") >= 0)
dbPswd = "test_pass";
else
dbPswd = "web_pass";
try
{
dbCon = DriverManager.getConnection(dbUrl, paramDbUserStr,
dbPswd);
dbStmt = dbCon.createStatement();
dbStmt.setEscapeProcessing(true);
}
catch(Exception eDbOpen)
{
failedDialog("Failed to open db connection!",
eDbOpen.getMessage());
}
}

private void dbClose()
{
try
{
dbStmt.close();
dbCon.close();
}
catch(Exception eDbClose)
{
failedDialog("Failed to close db connection!",
eDbClose.getMessage());
}
}
=========

Can someone tell what what I need to change? I need to change it to
connect a Database named datadev on a MS SQL 2000 server. Where do I
put the below info?

"jdbc:eek:dbc:DRIVER={SQL
Server};Database="DATADEV";Server=VS032.INTERNAL.COM:3553;",
"web_user", "password"

Here's info that might be more clear then the above:

Server: VS032.INTERNAL.COM
Port: 3553
Database: DATADEV
User ID: web_user
Password: password

Sorry to ask, but I'm not a JAVA developer and was tasked to move a
web page from a UNIX platform to a Windows setup.
 
M

Manish Pandit

Need some help.....

Sorry to ask, but I'm not a JAVA developer and was tasked to move a
web page from a UNIX platform to a Windows setup.

I've responded this question on another thread that you started on
8/17.

-cheers,
Manish
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,074
Latest member
StanleyFra

Latest Threads

Top