Dean -
Here is a more specific reply to your question and a "short explanation" of
how these would work:
The product I was referring to is called J-Union from Middleware Bridge,
Inc. It practially allows to you to create any Java/EJB/Bean objects from
your PALM. It works with non-GUI, non-event, data only classes. For example,
you can write the following code in C++ on Palm:
....
wwVariant userId(wwString("")), password(wwString("")),
domain(wwString("")),
URL(wwString("http://thuyvy/servlet/JunionProxyEJBServlet"));
wwString dbUrl(wwString("jdbc:mysql://localhost/test")),
dbUid (wwString ("ktran")), dbPsw (wwString ("xyz")),
dbDriver("org.gjt.mm.mysql.Driver");
wwVariant* retCode = 0;
J_Client::createInstance(&URL, &userId, &password, &domain);
Junion_Connection* jConnection = 0;
Junion_Class* jClass = 0;
Junion_Statement* jStatement = 0;
Junion_ResultSet* jResultSet = 0;
wwString sql ("select * from test");
try
{
jClass = Junion_Class::forName(dbDriver);
jConnection = Junion_DriverManager::getConnection(&dbUrl, &dbUid,
&dbPsw);
jStatement = jConnection->createStatement();
jResultSet = jStatement->executeQuery(&sql);
cout << "database Access Completes...." << endl;
int recordNo = 1;
while (jResultSet->next())
{
Junion_String* col1 = jResultSet->getString(1);
Junion_String* col2 = jResultSet->getString(2);
Junion_String* col3 = jResultSet->getString(3);
cout << "Record " << recordNo++ << " : "
<< col1->c_str() << " --- "
<< col2->c_str()<< " --- "
<< col3->c_str()<< " --- "
<< endl;
delete col1;
delete col2;
delete col3;
}
}
catch (long error)
{
cout << "Error no: " << error << endl;
}
catch (...)
{
cout << "Error:..." << endl;
}
if (jResultSet)
{
jResultSet->close();
delete jResultSet;
}
if (jStatement)
{
jStatement->close();
delete jStatement;
}
if (jConnection)
{
jConnection->close();
delete jConnection;
}
if (jClass)
{
delete jClass;
}
cout << "DB access Exiting..." << endl;
....
that would cause the following code to execute on workstation/PC with JVM:
import java.sql.*;
public class TestJdbc
{
public static void main (String[] args)
{
try
{
String url = "jdbc:mysql://localhost/test",
uid = "abc", psw = "xyz";
Class.forName("org.gjt.mm.mysql.Driver").newInstance();
Connection c = DriverManager.getConnection(url, uid, psw);
Statement stmt = c.createStatement();
ResultSet rs = stmt.executeQuery("SELECT * from test");
while(rs.next())
{
System.out.print(rs.getString(1) + " --- " );
System.out.print(rs.getString(2) + " --- " );
System.out.println(rs.getString(3));
}
rs.close();
stmt.close();
c.close();
}
catch (Exception e)
{
System.err.println("Unable to load driver...");
e.printStackTrace();
}
System.out.println ("DONE!");
}
}
1. You would need to run the J-Union Proxy Servlet code on your web server
if you so chose HTTP as a transport. Or you can run a J-Union Proxy Java
program on your workstation if you chose TCP/IP socket interface.
2. You would get the result on your PALM as if you were using JDBC directly.
3. J-Union Junion DBC is an application of J-Union that helps to make this
possible.
4. With this tool, you would not need to write your servlet to extract data
from database but instead you would write client application directly on
palm and uses most of jdbc features. You can write client application on
Palm using either C++ (as shown above) or as in Java for J2ME devices.
If you need further information, please let me know. J-Union is in Beta and
will be available in the next couple of weeks. I'm working on a white paper
to explain all possible usages of J-Union including JDBC interface and
JavaMail 1.2 on handheld devices.
I hope that helps to explain a bit better than last time and that I hope it
would help you in your application.
Regards,
Kiet.
>>-----Original Message-----
>>From: [EMAIL PROTECTED]
>>[mailto:[EMAIL PROTECTED]]On Behalf Of Dean
>>Rochester
>>Sent: Thursday, May 24, 2001 9:14 PM
>>To: Palm Developer Forum
>>Subject: RE: Conduit Question
>>
>>
>>Yes that would be great. Does it exist? If so, then how does it work?
>>When I put the palm device in it's cradle? During the hot sync process?
>>How? How can I get a test of this great tool? Doesn't there need to be a
>>JVM on the Palm? Are you using KVM?
>>
>>Dean-O
>>
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/