Jdbc-odbc error in an applet
I'm trying to use a jdbc-odbc driver to connect to a db. When I do this using an application I have not problems but I'm trying to do the same in an applet and I get this error message:
java.security.AccessControlException: access denied (java.lang.RuntimePermission accessClassInPackage.sun.jdbc.odbc
Here is the part of the program where it happens
try {
Class.forName(driver);
} catch(Exception ex) {
setError("Can't find Database driver class: " + ex);
return;
I hope you can tell me
copy this line in {jre}/lib/java.policy
jre = java runtime directory
permission java.lang.RuntimePermission "accessClassInPackage.sun.jdbc.odbc";
Similar Messages
-
SQLAllocHandle on SQL_HANDLE_ENV failed - JDBC-ODBC Error
Hai,
i am connecting the Oracle 8i by using the JDBC-ODBC Driver. When i get connection by using the DriverManager, it throws the following Error.
java.sql.SQLException: [Microsoft][ODBC Driver Manager] Driver's SQLAllocHandle on SQL_HANDLE_ENV failed
Please advise me
Thanks in Advance
Regards
sankarjune14Respected Sir/Madam,
i am connecting the Oracle 8i by using the JDBC-ODBC
Driver. When i get connection by using the
DriverManager, it throws the following Error.
Driver's SQLAllocHandle on SQL_HANDLE_ENV failed.
the dsn name already created succeesfully. then also i am
getting this run time error
plz give me a solution. -
Hello,
I'm testing the following code that contects to an Access Database
import java.sql.*;
public class AccessTest
public static void main(String[] args)
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String dataSourceName = "scan";
String dbURL = "jdbc:odbc:" + dataSourceName;
Connection con = DriverManager.getConnection(dbURL, "","");
Statement s = con.createStatement
ResultSet.TYPE_SCROLL_SENSITIVE,
ResultSet.CONCUR_UPDATABLE);
s.execute("select * from test");
ResultSet rs = s.getResultSet();
if (rs != null) // if rs == null, then there is no ResultSet to view
while ( rs.next() ) // this will step through our data row-by-row
/* the next line will get the first column in our current row's ResultSet
as a String ( getString( columnNumber) ) and output it to the screen */
// System.out.println(rs.getString("f_name")+"\t\t");
rs.updateString("l_name","Welcomer ");
rs.updateRow();
// System.out.println("Last Name: "+rs.getString(2));
System.out.println("Number: "+rs.getString(3));
System.out.println("Age: "+rs.getString(4));
//System.out.println("Date: "+rs.getDate(5));
//Date tmp = rs.getDate(5);
System.out.println();
s.close(); // close the Statement to let the database know we're done with it
con.close(); // close the Connection to let the database know we're done with it
catch (Exception err) {
System.out.println("ERROR: " + err);
the code that is commented out, was done so as I tried to debug this. What I'm trying to do is update the field l_name in a record. Yes I know using SQL update will do it, but I need to it this way for my application that I'm designing. The error I get is
java.sql.SQLException :[Microsoft][ODBC Microsoft Access Driver] Error in row.
the table in question only has 3 entries. The last name is updated for the first only, thus the error is coming up before the result set is moved by one. Please advise.
Thanks in advanceInstead of multi-posting, why don't you just post a link to your other one(s), like this:
http://forum.java.sun.com/thread.jsp?forum=31&thread=337252
Anyway, my guess is that maybe the MS Access driver doesn't allow updateable resultsets. -
Load oracle jdbc driver error when run applet via the web
Hi All,
I have built an applet which connect to database via jdbc thin driver. It works fine when I run it through the applet viewer, but got a problem when run it through the web.
java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleDriver
I am using jdev9i 9.0.4 and jdk 1.4.2. The jdbc version is 9.0.1
I have added both the classes12.zip and ojdbc14.zip in the class path and also pack them together with my applet class. Here is the code
public class MyApplet extends Applet
implements Runnable
public void start()
if(theThread == null)
theThread = new Thread(this);
theThread.start();
Retrieve R = new Retrieve();
this.MyMap = R.retrieveDesc();
public class Retrieve
public Retrieve()
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
conn=DriverManager.getConnection("jdbc:oracle:thin:@babyruth.wvu.edu:1703:devdw", User, Password);
conn.setAutoCommit(true);
connectStatus = true;
public HashMap retrieveDesc()
return map;
I have also built one HTML page NewApplet like this
<HTML>
<HEAD>
<TITLE> My New Applet</TITLE>
</HEAD>
<APPLET CODE="MyApplet.class" CODEBASE="menu" ARCHIVE="MyApplet.zip" WIDTH=300 HEIGHT=485>
<!--General Settings-->
<param name="bgcolor" value="255,255,255">
</HTML>
Any advice is highly appreciated
MeiSir,
Well you haven't "packed" them correctly. Why don't you just add the driver bits to the soucebase tag? or something like that anyway...
Sincerely,
Slappy -
Problem: connect DB with Applet by JDBC-ODBC bridge
Dear all,
When I connect local MS SQL server by "sun.jdbc.odbc.JdbcOdbcDriver" as below, it works well! However, when I put the similar code under Java Applet program, it cannot run by showing error:
java.security.AccessControlException: access denied (java.lang.RuntimePermission accessClassInPackage.sun.jdbc.odbc)
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:272)
at java.security.AccessController.checkPermission(AccessController.java:399)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:545)
at java.lang.SecurityManager.checkPackageAccess(SecurityManager.java:1501)
at sun.applet.AppletSecurity.checkPackageAccess(AppletSecurity.java:169)
I think Java Applet has some security policy when I try to use applet to connect(read/write) DB. How can I solve it so that I can browse my applet under IE.
Thanks a lot!
Here is my worked code in Java program but not in Applet:
import java.sql.*;
public class TestJDBC1 {
public static void main(String args[]) throws Exception {
String userid = "";
String password = "";
// Register the driver with DriverManager
new sun.jdbc.odbc.JdbcOdbcDriver();
// Get a connection
Connection conn = DriverManager.getConnection("jdbc:odbc:rdr",
userid, password);
// Create a statement for executing SQL
Statement stmt = conn.createStatement();
// Execute a query / SELECT statement
ResultSet rset = stmt.executeQuery("SELECT * FROM PlatformNode");
ResultSetMetaData rsmd = rset.getMetaData();
// Find out how many columns were returned by the query
int count = rsmd.getColumnCount();
// Loop until all rows have been processed
while (rset.next()) {
// Loop until all columns in current row have been processed
for (int i = 1; i <= count; i++) {
// Print out the current value
System.out.print(rset.getObject(i));
// Put a comma between each value
if (i < count) {
System.out.println(",");
// Start the next row's values on a new line
System.out.println("");
// Close the database objects
rset.close();
stmt.close();
conn.close();Hi,
Applets by default are restricted from accessing a lot of things.to enable applest from accessing database and other thngs u need to edit the policy file
Try this.
go to the jre/bin directory open the policytool.exe file
and add permission(in ur case RuntimePermission to access class in package sun.jdbc.odbc) and save the file.
this will enable applets from accessing the databse.
Hope that helps
Note:
policytool.exe must be used to open the java.policy file present in /jre/lib/security directory and then add the permissions
regards,
Partha -
Problems: connect DB with Applet by JDBC-ODBC bridge
Dear all,
When I connect local MS SQL server by "sun.jdbc.odbc.JdbcOdbcDriver" as below, it works well! However, when I put the similar code under Java Applet program, it cannot run by showing error:
java.security.AccessControlException: access denied (java.lang.RuntimePermission accessClassInPackage.sun.jdbc.odbc)
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:272)
at java.security.AccessController.checkPermission(AccessController.java:399)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:545)
at java.lang.SecurityManager.checkPackageAccess(SecurityManager.java:1501)
at sun.applet.AppletSecurity.checkPackageAccess(AppletSecurity.java:169)
I think Java Applet has some security policy when I try to use applet to connect(read/write) DB. How can I solve it so that I can browse my applet under IE.
Thanks a lot!
Here is my worked code in Java program but not in Applet:
import java.sql.*;
public class TestJDBC1 {
public static void main(String args[]) throws Exception {
String userid = "";
String password = "";
// Register the driver with DriverManager
new sun.jdbc.odbc.JdbcOdbcDriver();
// Get a connection
Connection conn = DriverManager.getConnection("jdbc:odbc:rdr",
userid, password);
// Create a statement for executing SQL
Statement stmt = conn.createStatement();
// Execute a query / SELECT statement
ResultSet rset = stmt.executeQuery("SELECT * FROM PlatformNode");
ResultSetMetaData rsmd = rset.getMetaData();
// Find out how many columns were returned by the query
int count = rsmd.getColumnCount();
// Loop until all rows have been processed
while (rset.next()) {
// Loop until all columns in current row have been processed
for (int i = 1; i <= count; i++) {
// Print out the current value
System.out.print(rset.getObject(i));
// Put a comma between each value
if (i < count) {
System.out.println(",");
// Start the next row's values on a new line
System.out.println("");
// Close the database objects
rset.close();
stmt.close();
conn.close();ur question has just been answered under the java programming section
-
Jdbc-odbc java error using SQL adapter in o9iASWireless
I've used the SQL adapter in the previous releases of wireless without any problem. Most of the time I would use it for all the wireless PLSQL applications in the Oracle database and it works very OK.
I have also used it to connect with a SQLserver database to try out some queries. In this case I would use the standard JDBC/ODBC bridge driver from SUN.
In release 2.0 I can't connect with this SQL Server database anymore.
I've added a system DSN to the ODBC configuration of the Windows 2000 server. This will give access to a internal SQL server database via TCP. A password username is required.
When I try to add a SQLservice in the service designer using the SQL adapter I will use the following parameters:
JDBC connect string: JDBC:ODBC:<DSNNAME>
JDBC driver: sun.jdbc.odbc.JdbcOdbcDriver
un: <username>
pw: password>
Query (without ';'): select count(*) from <tablename>
Minimum number of Database connections in the pool 5
Maximum number of Database connections in the pool 100
Increment size for the connection pool 1
Idle Timeout (in minutes) 30
Now I get the following error:
2/8/03 2:27:59 PM ERROR : [ApplicationServerThread] webtool.common.PtgErrorLog.outputError(PtgErrorLog.java:28)
oracle.cabo.servlet.event.PageEventException: java.lang.ClassCastException: sun.jdbc.odbc.JdbcOdbcConnection,page=Page[name=designer/MasterServiceInitCreate],event=PageEvent[name=goto,source=wizardNav,fromPage=designer/MasterServiceInitCreate,JDBC_DRIVER=sun.jdbc.odbc.JdbcOdbcDriver,JDBC_CONNECT_STRING=jdbc:odbc:<DSNNAME>,CONNPOOL_INC=1,CONNPOOL_MIN=5,CONNPOOL_IDLETIMEOUT=30,USERNAME=<USERNAME>,value=4,SQLTYPE=QUERY,CONNPOOL_MAX=100,STATEMENT=select count(*) from bedrijven,PASSWORD=<PASSWORD>],rootCause=oracle.panama.adapter.AdapterException: java.lang.ClassCastException: sun.jdbc.odbc.JdbcOdbcConnection
at oracle.cabo.servlet.event.BasePageFlowEngine.handleRequest(Unknown Source)
at oracle.cabo.servlet.AbstractPageBroker.handleRequest(Unknown Source)
at oracle.panama.webtool.common.PtgPageBroker.handleRequest(PtgPageBroker.java:152)
at oracle.cabo.servlet.PageBrokerHandler.handleRequest(Unknown Source)
at oracle.cabo.servlet.BajaServlet.doGet(Unknown Source)
at oracle.cabo.servlet.BajaServlet.doPost(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:211)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:309)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:633)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:235)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:695)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:248)
at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:62)
I got the error 'java.lang.ClassCastException: sun.jdbc.odbc.JdbcOdbcConnection' in my log and tried to find out the meaning of this error at java.sun.com. It's stil not clear what exactly causes the error but it looks like a data formatting error.
java.lang.ClassCastException
(Thrown to indicate that the code has attempted to cast an object to a subclass of which it is not an instance. For example, the following code generates a ClassCastException:
Object x = new Integer(0);
System.out.println((String)x); )
Is it just a data formatting problem or has it something to do with the JDBC/ODBC driver version of the JDK from the appliction server release 2.0.
I remember that I was always able to connect to the SQL server database with previous releases also with a count query. I've also used JDK 1.3.1 with o9iAS release 1.0.2.1.
Any suggestions for a solution?
Thanks in advance for your help.try this link:
http://community.eapps.com/showthread.php?p=8 -
Stored Procedure error with JDBC:ODBC
Hi,
I am trying to run a stored procedure on RDMS (Uniaccess ODBC). This has 2 input parameters and returns a resultset of 3 columns. The following is the error I am getting and am stumped. Please help..
(similar call statement works with VB and ADO)
--------output ---------------
Calling MGC005
inside resultset sun.jdbc.odbc.JdbcOdbcCallableStatement@129206
row 1
get string 0004
get string 00000
get string
SQLEcception : java.sql.SQLException: [AIS][UniAccess ODBC Driver]Invalid Column Number//Specified column is before the column specified in the previous call
----------------------source code ------------------
import java.awt.Graphics;
import java.sql.*;
public class JdbcTest {
public JdbcTest() {
Connection con;
CallableStatement stmt;
try {
Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver");
catch (Exception ex) {
System.out.println ("Database Driver not found");
System.exit(0);
try {
String msDbUrl = "jdbc:odbc:CMS_TEST_ODBC";
con = DriverManager.getConnection(msDbUrl, user, password );
stmt = con.prepareCall("{ call MGC005(?, ?)}");
stmt.setString( 1, "CH" );
stmt.setString( 2, "ARRINGTON0909170320010615" );
// stmt.registerOutParameter( 1, java.sql.Types.VARCHAR);
// stmt.registerOutParameter( 2, java.sql.Types.VARCHAR );
// stmt.registerOutParameter( 3, java.sql.Types.VARCHAR );
System.out.println( "Calling MGC005 " );
ResultSet rs = stmt.executeQuery();
while (rs.next()) {
System.out.println( " inside resultset " + rs.getStatement() );
System.out.println( " row " + rs.getRow() );
System.out.println( " get string " + rs.getString(1) );
System.out.println( " get string " + rs.getString(2) );
System.out.println( " get string " + rs.getString(3) );
String i = rs.getString (1);
String s = rs.getString (2);
String t = rs.getString (3);
String text = i + " " + s ;
System.out.println ( " Output " + text);
stmt.close();
con.close();
} catch( SQLException ex ) {
System.out.println ("SQLEcception : " + ex);
public static void main(String[] args) {
new JdbcTest();
}Hi,
The error seems to occur on the line:
String i = rs.getString (1);
The error exactly states what is occuring: "Specified column is before the column specified in the previous call". Try limiting the call to getString() to one for each column for each row.
Try replacing these lines:
System.out.println( " get string " + rs.getString(1) );
System.out.println( " get string " + rs.getString(2) );
System.out.println( " get string " + rs.getString(3) );
String i = rs.getString (1);
String s = rs.getString (2);
String t = rs.getString (3);
with something like:
String i = rs.getString (1);
System.out.println( " get string " + i);
String s = rs.getString (2);
System.out.println( " get string " + s);
String t = rs.getString (3);
System.out.println( " get string " + t);
Hope this works,
Kurt. -
Compile error when connecting to JDBC:ODBC
Hi
I am not used to java so probably this is an enivorment problem, but I cannot fix, please help!
FOLLOWING CODE
import java.sql.*;
public class DBtest {
public static void main (String args[]) {
String jdbcDriver = "sun.jdbc.odbc.JdbcOdbcDriver";
String protocolHeader = "jdbc:odbc:";
String dbName = "myodbc3-test";
String user = "";
String password = "";
Class.forName(jdbcDriver);
Connection cn =
DriverManager.getConnection(protocolHeader+dbName, user, password);
GENERATES FOLLOWING COMPILING ERROR
cd c:/Javakod/NewFolder/
javac -classpath C:\Javakod\ DBtest.java
DBtest.java:17: incompatible types
found : java.sql.Connection
required: NewFolder.Connection
DriverManager.getConnection(protocolHeader+dbName, user, password);
^
1 error
What is wrong? I am using a Win2000.This code compiles and runs fine on my Windows 2000 machine running JDK 1.4.1:
import java.sql.*;
public class AnotherConnectionTester
public static void main(String [] args)
String jdbcDriver = "sun.jdbc.odbc.JdbcOdbcDriver";
String protocolHeader = "jdbc:odbc:";
String dbName = "myodbc3-test";
String user = "";
String password = "";
try
Class.forName(jdbcDriver);
Connection cn = DriverManager.getConnection(protocolHeader+dbName, user, password);
DatabaseMetaData meta = cn.getMetaData();
System.out.println("product name: " + meta.getDatabaseProductName());
catch (Exception e)
e.printStackTrace(System.err);
}I set up an ODBC DSN myodbc3-test to connect to an Access database. It was no problem. I guess that doesn't explain why your post didn't work. I changed the name of the class and added that meta data output so I could make sure that it connected. - MOD -
Jdbc:odbc:MSAccess Error
Hi All,
I am trying to establish a link to my access database (easy enough u would think!!!) via sun.jdbc.odbc.JdbcOdbcDriver and i get this really horrible error message :-
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x6D36
Function=[Unknown.]
Library=C:\Program Files\Java\j2re1.4.0\bin\client\jvm.dll
NOTE: We are unable to locate the function name symbol for the error
just occurred. Please refer to release documentation for possi
reason and solutions.
Current Java thread:
at sun.jdbc.odbc.JdbcOdbc.setStmtAttrPtr(Native Method)
at sun.jdbc.odbc.JdbcOdbc.SQLSetStmtAttrPtr(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcResultSet.setRowStatusPtr(Unknown S
at sun.jdbc.odbc.JdbcOdbcResultSet.initialize(Unknown Source
at sun.jdbc.odbc.JdbcOdbcStatement.getResultSet(Unknown Sour
- locked <02A7D658> (a sun.jdbc.odbc.JdbcOdbcStatement)
at sun.jdbc.odbc.JdbcOdbcStatement.executeQuery(Unknown Sour
at testPSConnection.main(testPSConnection.java:47)
Dynamic libraries:
0x00400000 - 0x00406000 C:\WINNT\system32\java.exe
0x77F80000 - 0x77FFB000 C:\WINNT\System32\ntdll.dll
0x77DB0000 - 0x77E0B000 C:\WINNT\system32\ADVAPI32.dll
0x77E80000 - 0x77F35000 C:\WINNT\system32\KERNEL32.DLL
0x77D40000 - 0x77DB0000 C:\WINNT\system32\RPCRT4.DLL
0x78000000 - 0x78046000 C:\WINNT\system32\MSVCRT.dll
0x6D330000 - 0x6D445000 C:\Program Files\Java\j2re1.4.0\bin\
ll
0x77E10000 - 0x77E74000 C:\WINNT\system32\USER32.dll
0x77F40000 - 0x77F7C000 C:\WINNT\system32\GDI32.DLL
0x77570000 - 0x775A0000 C:\WINNT\system32\WINMM.dll
0x6D1D0000 - 0x6D1D7000 C:\Program Files\Java\j2re1.4.0\bin\
0x6D300000 - 0x6D30D000 C:\Program Files\Java\j2re1.4.0\bin\
0x6D210000 - 0x6D228000 C:\Program Files\Java\j2re1.4.0\bin\
0x6D320000 - 0x6D32D000 C:\Program Files\Java\j2re1.4.0\bin\
0x6D250000 - 0x6D25A000 C:\Program Files\Java\j2re1.4.0\bin\
0x1F7B0000 - 0x1F7E1000 C:\WINNT\system32\ODBC32.dll
0x71780000 - 0x7180A000 C:\WINNT\system32\COMCTL32.dll
0x76B30000 - 0x76B6E000 C:\WINNT\system32\comdlg32.dll
0x70BD0000 - 0x70C34000 C:\WINNT\system32\SHLWAPI.DLL
0x782F0000 - 0x78532000 C:\WINNT\system32\SHELL32.DLL
0x1F850000 - 0x1F866000 C:\WINNT\system32\odbcint.dll
0x1F8F0000 - 0x1F932000 C:\WINNT\System32\odbcjt32.dll
0x1B000000 - 0x1B16F000 C:\WINNT\System32\msjet40.dll
0x1B5C0000 - 0x1B655000 C:\WINNT\System32\mswstr10.dll
0x77A50000 - 0x77B46000 C:\WINNT\system32\ole32.dll
0x779B0000 - 0x77A4B000 C:\WINNT\system32\OLEAUT32.dll
0x1F8E0000 - 0x1F8EE000 C:\WINNT\System32\odbcji32.dll
0x1B2C0000 - 0x1B2CD000 C:\WINNT\System32\msjter40.dll
0x1B2D0000 - 0x1B2F6000 C:\WINNT\System32\MSJINT40.DLL
0x775A0000 - 0x77625000 C:\WINNT\system32\CLBCATQ.DLL
0x1B7F0000 - 0x1B82A000 C:\WINNT\System32\msjtes40.dll
0x10750000 - 0x1075B000 C:\WINNT\system32\VBAJET32.DLL
0x10B70000 - 0x10BD2000 C:\WINNT\system32\expsrv.dll
0x77920000 - 0x77943000 C:\WINNT\system32\imagehlp.dll
0x72A00000 - 0x72A2D000 C:\WINNT\system32\DBGHELP.dll
0x690A0000 - 0x690AB000 C:\WINNT\system32\PSAPI.DLL
Local Time = Tue Feb 18 04:29:58 2003
Elapsed Time = 0
# HotSpot Virtual Machine Error : EXCEPTION_ACCESS_VIOLATION
# Error ID : 4F530E43505002D5
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
# Java VM: Java HotSpot(TM) Client VM (1.4.0_01-b03 mixed mode)
# An error report file has been saved as hs_err_pid1380.log.
# Please refer to the file for further information.
I know the code is ok,
i am running this on win2k with java 1.3 and java1.4.0_01 run time,
Any ideas would be very gratefully recieved.
Thanks in advance..
Sajidactually i got this working by downloading the latest sdk for java
j2se 4.01.
So if anyone has a similar problem, thats what you should do!!!
I think there was a problem with the hotspot runtime environment before, but its all sorted now. -
JDBC-ODBC BRIDGE (General error)
I get some time "SQLException : general error" on the screen followed by a "[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]General network error. Check your network documentation" when i am using the jdbc-odbc bridge on a jsp page
My configuration:
OS : WIN NT 4.0
TOMCAT 4.0
JSP
Database : SQL server 2000
Database driver: Sun JDBC-ODBC bridge
Could it come from a concurrent access problem?
Does anyone have an idea?
Thank you,
DeeneshI've found that the descriptive "General Error" message ususally means there's something wrong with my sql. If your db passes Navin's test (meaning it's up and running), then try to take your sql query and paste it into a sql window for your db. Sometimes this gets you an error message that is a little more descriptive.
-
I have the following error when i try to run my program(I have used JFrame instead of JApplet ) :
[Microsoft] [ODBC Driver Manager] Invalid cursor state
I'm using VJ# and i read on oreilly's site that JDBC-ODBC bridge doesn't work with it, so how should i resolve the problem?
could somebody suggest a better and easy-to-use Type 1 driver(which is free)Closing the statements defeats the purpose of prepared statements with my design. The whole point is to load them at startup and reuse them.
Another driver is an option however where does one get one and are they free?
I have implemented a temporary solution that I found in the archives. I have used a while statement to make sure that I have got to the end of the result set, however a nested if only looks for the first result. I am only retrieving one row from the database so only need the first. Logic says to me that rs.next() must have to evaluate to false. It is a bit messy but it works . . . so far.
L -
JDBC:ODBC through Applet?!?
Hi folks!
Can anyone please tell me exactly what i need to do on the clients computer befor i can implement a JDBC:ODBC-bridge for SQL Server 6.5 connectivity?
This program, unfortunately, must be an Applet.
The Client environment looks like this:
-Windows 98
-Internet Explorer 5
-JDK 1.3
What about the Jdbc drivers where do i put them?
And the policy-files, do i really need to change the security.policy on all client-computers?
I know there is a lot of tutorials and threds like this one but
none has got the suitable answer for my situation.
Many thanks in advance!
Regards
Robert H�kanssonYes it is possible to connect applet to the databse. For this you need to use the database specific drivers to make the database connection along with the certificate from any certificate authority like verisign.com or some other certificate authority. If user accepts the certificate , he will be able use the applet as a normal applet otherwise applet will not load on the client.
-
URGENT: Error: Failed to Load JDBC/ODBC Driver
I have created a database in Access and created user interface for it. Whenever I run the program from DOS (i.e java CarRental) the program begins but when I try to add a customer or add a vehicle I get the error java.lang.ClassNotFoundException: com.ms.jdbc.odbc.JdbcOdbcDriver.
However, if I run it directly from MVisual J++ 6 it connects to the database fine. I have installed J2SDK 1_4 on my computer. Should I make changes to the following code?
String url = "jdbc:odbc:CarRental";
try{
Class.forName( "com.ms.jdbc.odbc.JdbcOdbcDriver" );
connection = DriverManager.getConnection(url);
Since I downloaded J2SDK does it need to be "sun.jdbc.odbc.JdbcOdbcDriver"?
Please help- time is running thin!
Thanks
AngieThe correct classname for the JDBC:ODBC bridge is
sun.jdbc.odbc.JdbcOdbcDriver
Thomas -
How to use jdbc:odbc without using ODBC applet in Control Panel??
Hi All,
I have a servlet that interacts with an MS Access database called test.mdb, I'm connecting to it using DSN which is test
conn = DriverManager.getConnection("jdbc:odbc:test", "", "");
However I want to upload the servlet along with the database to a remote server, how can I change the code to point the database name test.mdb without -obviously- using the DSN name that is set in the control panel
Thanks in advancesmg123 Thanx a lot.
I'm using Access because the remote server has only Access now
Thansks for the advice appreciate it.
Maybe you are looking for
-
Re: AP_CHECKS_ALL
Hi All, Can any one please help me out how to differentiate between payments made and yet to be made from AP_CHECKS_ALL. We are using 11.5.10.2 and Database version is 10g. Thanks, jaya
-
I just download and try WTK2.5 today, I changed the file ktoos.properties to use Retroguard as the document said, the toolkit shown the following error message while building the app! The obfuscation class file can not be loaded. com.sun.kvem.ktools.
-
Customize Lookup Window of Related Information
Hi, I added Custom Object 2 as related information to contact record. When I click on ADD button a lookup window pops up and shows me all the values available on Custom Object 2. Is it possible to customize this lookup window? there are many unnessec
-
Trouble exporting to DVDSP from FCP5
I'm having trouble exporting my sequence into DVDSP4. I've tried using Quicktime Conversion and Quicktime but the sequence doesn't import into DVDSP and neither do the menue templattes. When I attempt to convert to Quicktime a message pops up with "d
-
I am having major issues with the new version of Final Cut x, I have missing clips and my computer is locking up, I need to finish some projects so is there away to go back to the last version before the new update?