Announcement

Collapse
No announcement yet.

NO suitable driver for sqlserver?

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

  • NO suitable driver for sqlserver?

    HI!
    I'm using Sql Server. Will I select Sun JDBC - ODBC Bridge or SqlServer/Sybase as the driver?I tried both but it keeps giving me an exception saying: "No suitable Driver"
    What do I need to install upon having an exception like that? Can u pls give the link?

    Thanks File_to_db_setup.doc (0 bytes)
    Tonet

  • #2
    Re:NO suitable driver for sqlserver?

    I'm using Sql Server/Sybase with a Driver URL like:

    Code:
    jdbc:jtds:«»sqlserver://servername:1433/database
    and I'm connecting fine

    Post edited by: chrisl, at: 04/24/2007 10:00

    Comment


    • #3
      Re:NO suitable driver for sqlserver?

      okay! thanks guys! But where do yo write the Insert code??
      e.g.
      var driver = "net.sourceforge.jtds.jdbc.Driver";
      var address = "jdbc:jtds:sqlserver://saleslip2k/mirthdb";
      var username = "sa";
      var password = "cardtech";

      //DatabaseConnection

      var dbConn = DatabaseConnectionFactory.createDatabaseConnection (driver, address, username, password);

      var patId = msg['PID']['PID.2']['CX.1'];

      var expression = "INSERT IGNORE INTO patient_id values ('" + patId + "');";

      var result = dbConn.executeUpdate(expression);

      //closes the connection to the DB
      dbConn.close();


      //finally you can return whatever you want to do with your filter.
      return true;

      ----------
      What's wrong with this? Please give a sample code for sqlserver. Thanks!

      Post edited by: shifting_18, at: 04/24/2007 23:08
      Tonet

      Comment

      Working...
      X