sybase database connectivity

Hi Guys,
I m new to vaadin and really excited to work with this framework.
I can only see examples related to oracle/mysql/. kindly share the process for sybase database connectivity.

In Vaadin, you can do whatever you want in Java and Java related technologies. So, Sybase connectivity is not an issue. Just use Sybase’s jconnect JDBC driver to connect to Sybase databases.

Thanks for the reply Syam.!!
However I got the issue and am posting a sample code for the reference of beginers like me.!!! Happy Coding :slight_smile:

package com.example.vaadin_dbconnect;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import java.sql.Statement;

import com.vaadin.data.util.sqlcontainer.SQLContainer;
import com.vaadin.data.util.sqlcontainer.connection.JDBCConnectionPool;
import com.vaadin.data.util.sqlcontainer.connection.SimpleJDBCConnectionPool;
import com.vaadin.data.util.sqlcontainer.query.TableQuery;
import com.vaadin.server.Page;
import com.vaadin.server.VaadinRequest;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.FormLayout;
import com.vaadin.ui.Label;
import com.vaadin.ui.Notification;
import com.vaadin.ui.UI;
import com.vaadin.ui.VerticalLayout;

/**

  • Main UI class
    */
    @SuppressWarnings(“serial”)
    public class Vaadin_dbconnectUI extends UI{

    private SQLContainer personContainer = null;
    private SQLContainer cityContainer = null;

    @Override
    protected void init(VaadinRequest request) {
    // TODO Auto-generated method stub
    final VerticalLayout layout = new VerticalLayout();
    layout.setMargin(true);
    setContent(layout);
    Button submit=new Button(“dbconnect”);

      layout.addComponent(submit);
      
      
     	submit.addClickListener(new Button.ClickListener() {
     		public void buttonClick(ClickEvent event) {
     			layout.addComponent(new Label("Thank you for clicking"));
     			
     			 try{
     					
     					Class.forName("net.sourceforge.jtds.jdbc.Driver");
     					Connection con=DriverManager.getConnection("jdbc:jtds:Sybase://server_IP/Name:port/dbName", "user", "pass");
     					Statement st=con.createStatement(
     						    ResultSet.TYPE_SCROLL_INSENSITIVE, 
     						    ResultSet.CONCUR_READ_ONLY);
     					ResultSet rs=st.executeQuery("Select  usename,pass from tempdb..mtm_va_login ");
     					//ResultSetMetaData rsmd = rs.getMetaData();
     					
     					while(rs.next()){
     						System.out.println(rs.getString(2));
     					}
     					
     						
     					}
     					catch (Exception e) {
     						// TODO: handle exception
     						System.out.println(e) ;
     					}
    
     		}
     		
     		
     		
     	});
    

    }

}