Kevin Cary

Ranch Hand
+ Follow
since Jan 24, 2001
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Kevin Cary

Thanks Michael:
The download was successful.
Happy New Year!
Kevin
Would someone sent me a link to download the Java Servlet Development Kit?
Thanks
I guess my approach is a little different. I'm using the methods getFields and getValues directly then us loops to build strings so I can compare based on value and field location. The problem I have with find is it compares only values and not names. What do you think?
In JTable I noticed a method setUI( TableUI table ). Does anyone know what this is? I think it might have something to do with painting components.
In my case there seemed to be a processing time delay. My JFrame would launch before the data was avail to load into my JTable. My solution was to create a thread so data would be avail in time.
For some reason my JFrame won't show my JTable until I mouseClick where each component should be.
In the beginning, I was modifying the classpath in the autoexec.bat file thinking this would search for the MsqlDriver. This hasn't worked. Secondly I was using WinZip to open the jar file which seems to be a mistake. What has worked is to use the jar utility to open the jar file and to copy the driver to the directory indicated by the package and then importing this package into you application. The code below was shamelessly ripped off and does work. There may be other solutions but this one has worked for me.
import java.sql.*;
import com.imaginary.sql.msql.*;

public class Connect
{
public static void main ( String args[] )
{
Connection mSQL = null;
try
{
new MsqlDriver();
String url = "jdbc:msql:///StockMarket";
Connection mSQLcon = DriverManager.getConnection ( url );
Statement stmt = mSQLcon.createStatement();
ResultSet rs = stmt.executeQuery( "SELECT * FROM Stock");
while( rs.next())
{
System.out.println( rs.getString(1));
}
}
catch ( SQLException sql )
{
sql.printStackTrace();
}
finally
{
if ( mSQL != null )
{
try
{
mSQL.close();
}
catch ( Exception ex )
{
ex.printStackTrace();
}
}
}
}
}
I'm having the same problem, "I keep getting a class not found exception" when using Class.forName( "com.imaginary.sql.msql.MsqlDriver" );. This package is located in my root directory which is in my classpath. Using "find" verifies the exact same location of MsqlDriver.class.
I've tried using Class.forName( "com.imaginary.sql.msql.MsqlDriver).newInstance() and tried moving the package to java\lib\ neither of which has worked.
I have since sent an email to imaginary.com. I'll let you know if I get a response.
Hey Bill,
I still can't get my database. There are no class files in directory with driver. Compiling using: javac *.java produces 66 errors. The first complaint is:
MsqlQueryData.java:4: cannot resolve symbol
symbol: class Encoder
location: package util
import com.imaginary.util.Encoder;
I've searched my hd and I don't have a class named Encoder. Below is the class I'm trying to run. Which doesn't run because it can't find the MsqlDriver. Any ideas?

import java.sql.*;
public class Test
{
public static void main( String args[] )
{
Connection mSQLcon = null;
try
{
Class.forName("com.imaginary.sql.msql.MsqlDriver").newInstance();
}
catch ( InstantiationException ie )
{
ie.printStackTrace ();
}
catch( ClassNotFoundException cfe )
{
System.err.println("Test.java:main:couldn't find driver");
cfe.printStackTrace();
}
catch( Exception e )
{
e.printStackTrace( );
}
finally
{
if( mSQLcon != null )
{
try
{
mSQLcon.close()
}
catch( Exception e )
System.err.println("Test.java:main method:finally");
}
}
}
}
}
Hi Bill nice to see your name as moderater. I was away developing a desktop tool and now I'm back with my previous challenge. You may recall I'm was having trouble connecting with mSQL database. Currently I'm using JDK1.3 SE, should I be using JDK1.3 EE?
Best to all,
Strange problem. I am developing an application using 2 JFrames.
Both JFrames are loaded during start up but only JFrame1 is visible. Pressing a button on JFrame1 sets JFrame1 invisible and JFrame2 visible. What happens is JFrame1 doesn't disappear and JFrame2 appears on top of JFrame1. The strange thing is this only happens once and this bug clears after switching back and forth from JFrame1 and JFrame2. Have you seen or heard of anything like this before? I've tried waiting before pressing the JButton but this doesn't help.
21 years ago
SET CLASSPATH=.;C:\PROGRA~1\JMF21~1.1_B\LIB\SOUND.JAR;
C:\PROGRA~1\JMF21~1.1_B\LIB\JMF.JAR;
C:\JDK1.3\LIB;
Sample Code:
Class.forName( "com.msql.MsqlDriver");
Using:
Class.forName( "com.msql.MsqlDr~1" );
still complains at run time but not as much. Which is to say it can't find the driver.
Driver is located this directory C:\JDK1.3\LIB\com\msql
This looks good to me. What do you think?
Does JDBC need to be registered when using with Win and mSQL?
Also any good Sun, etc articles or web pages?