JChem Base Search using .net application

User 58ea0aff73

19-02-2010 07:02:20

Hi.



I'm working on the Chemical Database on .net technologies. I have downloaded the all necessary software’s provided chemAxon and i was trying to executing the example project JChemBaseSearch_VS2005.

i got the ClassNotFound Exaption.

My Workout :

1. I have changed the existing oracle driver to "com.microsoft.sqlserver.jdbc.SQLServerDriver".

2. downloaded the new driver from Microsoft.

I appreciate if anybody help me on this



Thanks in advance
Sarma

ChemAxon 6e93227fcc

19-02-2010 07:34:03

Hi,


Try to make an instance of com.microsoft.sqlserver.jdbc.SQLServerDriver jsut before to set it for ConnectionHandler.


com.microsoft.sqlserver.jdbc.SQLServerDriver dummyDriver = new com.microsoft.sqlserver.jdbc.SQLServerDriver();


This is because in java it doesn't know to resolve that class and is expecting to be found in CLASSPATH environment variable. However this is a .NET environment so creating a new instance of that class will fix the problem.


Calin.

User 761d9eb85b

27-07-2010 09:47:45

Hi,


I am also trying this exemple in C# and I meet a similar problem.


First I try to use 'com.microsoft.sqlserver.jdbc.SQLServerDriver' as the JDBC driver but I did not find the dll version for this driver in the Microsoft website. I only find sqljdbc4.jar file which can only be used in Java.


So I used net.sourceforge.jtds.jdbc.Driver, offered in ChemAxon. I successfully get the connection. But in searcher.run() throw the SQLException -- incorrect syntaxe near keyword 'null'.


I checked the same code works well in Java with com.microsoft.sqlserver.jdbc.SQLServerDriver. So the base setup is correct.


I also checked in C# I can retrieve a record using   


Statement stmt = searcher.getConnection().createStatement(); ResultSet rs = stmt.executeQuery(sql);


 


So the connection is good.


I am using a French XP System, MSSQL 2008 Express and C# Express version.


I really hope some one can help me !


Ning


 


 

User 761d9eb85b

27-07-2010 13:14:53

I think I know the solution.


When I create the data base table, I used JChemManager with an older version.


When I update the database with the same version JChemManager, it is ok now.