Announcement

Collapse
No announcement yet.

Error in connecting sql server 2005

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Error in connecting sql server 2005

    I am trying to connect to sql server 2005 and it is giving the exception of "no suitable driver found ".

    The url I am using is :-
    var dbConn = DatabaseConnectionFactory.createDatabaseConnection ('net.sourceforge.jtds.jdbc.Driver','jdbc:sqlserve r://servernameortnumber/databasename','userid','password');

    Is there any thing wrong in the URL or do I have to modify some Mirh files?

    Thanks,

  • #2
    "no suitable driver found ".

    that's strange

    correct driver name: net.sourceforge.jtds.jdbc.Driver
    what you posted: net.sourceforge.jtds.jdbc.Driver

    (same)

    so, you've got the class name right. The only other reason that message should happen is if mirth is unable to load the class. The jtds.jar ships with mirth, so check <mirth install dir>\lib\custom\ and verify that you have a jtds-1.2.jar file in there and read permissions are ok.

    Other than that, I really dont know what to tell you. If that class is loadable, and you've got the name right, you should be past the no suitable driver found...

    Comment


    • #3
      There is whitespace in "jdbc:sqlserve r:" but maybe this is a typo from copy/paste/anonymization.

      Comment


      • #4
        Your connection string, shouldn't it be:

        'jdbc:jtds:sqlserver://...'

        I think you need to mention the 'jtds' part in your string.

        Comment


        • #5
          For SQL Express I am connecting fine with :
          jdbc:jtds:sqlserver://localhost:1443/mirthdb;instance=SQLEXPRESS

          For SQL Server :
          jdbc:jtds:sqlserver://localhost:1443/mirthdb

          Comment

          Working...
          X