Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » MSSQL Service how to?
MSSQL Service how to? [message #1414810] Mon, 01 September 2014 10:43 Go to next message
Flash Man is currently offline Flash ManFriend
Messages: 17
Registered: August 2014
Junior Member
Hello how to add MsSQL service to work with MSSQL database in scout? Im am using Eclipse Luna
Re: MSSQL Service how to? [message #1414824 is a reply to message #1414810] Mon, 01 September 2014 11:24 Go to previous messageGo to next message
barust Mising name is currently offline barust Mising nameFriend
Messages: 57
Registered: February 2014
Member
Solution to this issue here:
https://wiki.eclipse.org/Scout/HowTo/Write_a_jdbc_connection_bundle

It would be nice if you've been paying attention to these links:
https://wiki.eclipse.org/Scout/Tutorial/Minicrm/Set_up_SQL_Service
https://wiki.eclipse.org/Scout/Concepts/Sql_Service
https://wiki.eclipse.org/Scout/Tutorial/4.0/Add_JDBC_Drivers_for_Eclipse_Scout
Re: MSSQL Service how to? [message #1414830 is a reply to message #1414810] Mon, 01 September 2014 11:38 Go to previous messageGo to next message
Jeremie Bresson is currently offline Jeremie BressonFriend
Messages: 1252
Registered: October 2011
Senior Member
MsSQL ist not provided in our market place add-on: JDBC Drivers for Eclipse Scout. You need to write one by yourself: How-To: Write a jdbc connection bundle.

PS: Some people on this forum are using an Microsoft Database. Maybe they can share some code...
Re: MSSQL Service how to? [message #1415167 is a reply to message #1414830] Tue, 02 September 2014 08:35 Go to previous messageGo to next message
Bertin Kiekebosch is currently offline Bertin KiekeboschFriend
Messages: 330
Registered: August 2011
Senior Member
Hi,

this is my code for using MsSQL:

public class Mpx1SqlService extends AbstractSqlService implements IService2 {

  @Override
  protected String getConfiguredJdbcDriverName() {
    return "com.microsoft.sqlserver.jdbc.SQLServerDriver";
  }

  @Override
  protected java.lang.Class<? extends ISqlStyle> getConfiguredSqlStyle() {
    return RidMsSqlStyle.class;
  }
}



public class RidMsSqlStyle extends MSSQLSqlStyle {

  private static final long serialVersionUID = 1L;

  @Override
  public void testConnection(Connection conn) throws SQLException {
  }

  @Override
  public boolean isBlobEnabled() {
    return false;
  }

  @Override
  public boolean isClobEnabled() {
    return false;
  }

  @Override
  public boolean isLargeString(String s) {
    return false;
  }

  @Override
  protected int getMaxListSize() {
    return 0;
  }
}


You have to add the driver. I have done this is an seperate bundle.
Re: MSSQL Service how to? [message #1416029 is a reply to message #1415167] Thu, 04 September 2014 07:27 Go to previous message
Jeremie Bresson is currently offline Jeremie BressonFriend
Messages: 1252
Registered: October 2011
Senior Member
Hi Bertin,

Thanks for sharing your solution.
Previous Topic:Best practice: TablePageData + Pagination
Next Topic:New wizard in SWT app
Goto Forum:
  


Current Time: Thu Mar 28 20:59:39 GMT 2024

Powered by FUDForum. Page generated in 0.03904 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top