My English is not good enough so please understand it even if I make a mistake.
I am using mssql and java was using the connector.
It will be run. And the tree also be created.
But do not delete and modify.
Please help me make this program work properly, I hope.
(
I'll tell you some of my settings
(table (mssql))
CREATE TABLE tasks (
taskId int IDENTITY(1,1) NOT NULL,
parentId int DEFAULT ‘0’,
taskName varchar(250) DEFAULT NULL,
duration float DEFAULT ‘0.0’,
work float DEFAULT ‘0.0’,
start datetime DEFAULT NULL,
finish datetime DEFAULT NULL,
complete int DEFAULT ‘0’,
predecessors varchar(100) DEFAULT NULL,
resource varchar(100) DEFAULT NULL,
PRIMARY KEY (taskId)
)
(Tree_05_SaveConnector.java)
public class Tree_05_SaveConnector extends ConnectorServlet {
/* (non-Javadoc)
* @see com.dhtmlx.connector.ConnectorServlet#configure()
*/
@Override
protected void configure() {
Connection conn= ( new DataBaseConnection()).getConnection();
TreeConnector c = new TreeConnector(conn,DBType.MSSQL);
c.render_table("tasks","taskId","taskName","","parentId");
}
}
(DataBaseConnection .java)
public class DataBaseConnection {
Connection getConnection(){
Connection conn=null;
try {
Class.forName (“com.microsoft.sqlserver.jdbc.SQLServerDriver”).newInstance ();
conn = DriverManager.getConnection(“jdbc:sqlserver://localhost:1433;databaseName=custom”, “sa”, “7654”);
} catch (Throwable e) {
e.printStackTrace();
}
return conn;
}
}
(Additional questions :
- how to use getUserData and setUserData in mssql(and java)?
- Create table configuration effective to offer hope.
(ex: CREATE TABLE tree (treeid int IDENTITY(1,1) NOT NULL,~~~~~~ - When used in the actual project cost how much to pay are you doing?
)
Why should English properly, I did not speak English, was using Google Translator.
I’m sorry, and thank you for the last read.