Re: Moving Java Applet from Sun Environment to Windows..



Folks,

I'm not worried about the SQL queries themselves because I can fix
those. My biggest issue is changing the connection string to connect
to MS SQL, instead of Oracle.

I just started a new thread from what's the the original JAVA file,
but here's a copy below in case anyone can help.

==================================

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:oracle:thin:@" + 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:odbc: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.

===========================

It's probably something simple that most of you could do with your
eyes closed, but for me, Java is learning Chinese.

Thanks!!

.



Relevant Pages

  • Re: use of DBI; I am getting multiple error messages mixed in with the correct output.
    ... Perl was to relate it to uninitialized values in Java or C++. ... The fact that nulls in SQL have special ... Both Java and C++ have containers that support set theoretic ...
    (comp.lang.perl.misc)
  • Re: sql server i/o bottle neck ?
    ... My first guess is that you might be committing each SQL ... to perform many more transaction log writes. ... I'm not a java guy. ... On SQL Server the default behaviour is that each statement is a separate ...
    (comp.databases.ms-sqlserver)
  • Re: Possible Type Conversion Defect
    ... I'm developing a large application using SAP Web Application Server ... with JDBC Driver Beta 2 for SQL Server 2005 and I'm getting the SAME ... There's any solution or I must change my strategy to don't choice SQL ... a JDBC driver attempts to convert the underlying data to the Java ...
    (microsoft.public.sqlserver.jdbcdriver)
  • Re: SQL
    ... Persistence access is the abstraction, ... However, UML is just one of many OOA/D notations proposed, so it is an implementation of an OOA/D notation. ... Note that I was careful to say that SQL is a solution to persistence /access/ when the data is represented in RDB form. ... Sounds a little bit like Java and the JVM.... ...
    (comp.object)
  • Re: object databases
    ... Calling SQL from say java code is one of the easiest tasks in mordern ... The major problem is that SQL statements are written as strings in ... the strings are not compiled until runtime. ...
    (comp.object)