File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes about ADO Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "about ADO" Watch "about ADO" New topic
Author

about ADO

Eric lau
Greenhorn

Joined: Jan 21, 2002
Posts: 27
Can java invoke ADO ? and how ?


I come from China
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

You do realize ADO is an API. You could probably interface with the API through some DLL's using JNI. Not sure about invoking it though. But why???
What is wrong with JDBC? Are you having a problem with a database and you think ADO is the answer?
I would suggest that if you want to use ADO then use a MS Language to do so. It would be a lot easier.
I really am curious though as to why you want to use ADO with JAVA.


GenRocket - Experts at Building Test Data
Eric lau
Greenhorn

Joined: Jan 21, 2002
Posts: 27
Thank for your reply ,my trouble is :
We will install a database such as sybase on the client computer ,but we don't want our client know this operation and don't want client to view the data in the database ,so we want to register the DLL for sybase on the computer ,and we operate the Database file through the DLL .But now I don't know how to use the DLL .
Eric lau
Greenhorn

Joined: Jan 21, 2002
Posts: 27
by the way ,the OS of client 's computer is WINNT or WIN2000
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

I still don't see the problem. And I am not sure if I understand what you mean, by you not wanting the client to know about the sybase operation? Do you mean you don't want the client to realize they are using a database, or you are afraid of the client looking in the code of the class files and finding the information on how to get into the database illegally?
Both are easily solved and probably easier than getting into JNI operations.
As far as using a DLL, definatly look into JNI
[ September 09, 2002: Message edited by: Gregg Bolinger ]
Siegfried Heintze
Ranch Hand

Joined: Aug 11, 2000
Posts: 381
The easiest way to use ADO is to abandon Java in favor of J# (or J++). J# is basically Java 1.14.
ADO is implemented in COM and making Java talk to COM is exactly what all the hoopla was about regarding the lawsuites between Microsoft and SUN.
Making SUN's java talk to any COM object is very painful: you must create a JNI wrapper to call C and then another C wrapper to call ADO and calling ADO from C is no fun.
You might consider using IBM's C++ version of JNI (I cannot remember what it is called) because it is considerably easier to call ADO from C++. ADO was specifically designed to accommodate Visual Basic and Scripting programmers, however.
Siegfried Heintze
SIGNITEK Consulting
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

And if you are willing to use J#, you might as well use C# instead. I don't see any reason to use J# if you can use C#. And C# is JAVA. Plain and simpe.
Thomas Paul
mister krabs
Ranch Hand

Joined: May 05, 2000
Posts: 13974
In fact, it sounds like the whole thing would have been better if it had been written as a .NET application.


Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
 
jQuery in Action, 2nd edition
 
subject: about ADO