The update does not work.(tree,mssql,java)

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 :

  1. how to use getUserData and setUserData in mssql(and java)?
  2. Create table configuration effective to offer hope.
    (ex: CREATE TABLE tree (treeid int IDENTITY(1,1) NOT NULL,~~~~~~
  3. 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.

Try to use the updated jar file ( attached )

If issue still occurs - try to enable logs
docs.dhtmlx.com/doku.php?id=dhtm … nd_logging

Thanks for the help.

However, the following error message appears under the screenshot.

Instead, I received another dhtmlxconnector.jar files were used.

(viewtopic.php?f=19&t=16063)

When using this, can update & delete.

but still was not Drag and drop update.

I can drag the move and hope the updates.

Please help me add more to give hope to give in question would be appreciated.

Finally, thank you for reading this.


Sorry for inconvenience, valid jar file is attached - try to use it
Was checked locally - all operations works correctly now.
dhtmlxconnector.zip (163 KB)

Thanks for the help.

but I still can not drag and drop the update.

I hope can drag and drop updates.

In case of dnd - connector will process action as sequence of insert and delete operations.

I still do not know.

i can normal update and delete. but i can’t dnd update.

I sent a file that is being used.

Once you see.

A portion of the tree
(dump.sql or other parts)

i suggest you do the file fix.

(And I do not recognize 2byte characters.)
samples.zip (603 KB)

Try to use the updated jar - now dnd in tree must work for sure
dhtmlxconnector.zip (163 KB)

thank u Stanislav.
Updates are now without a problem.

But, I also 2 byte character is Not completely.

And I do not know how to use dhtmlxcommon.js.
(viewtopic.php?f=19&t=17326)

And the last question
I want to make a link in the tree menu.
But in dataprocessor dp.getUserData dp.setUserData and I do not know how to use.
Create a db on that table to write on is doing??? or whether other way?
How to make me a link please let me know how to use or dp.setUserData.

Finally, create a program that is always a good response and are thankful.

And I do not know how to use dhtmlxcommon.js
just replace existing dhtmlxcommon.js, which already must be included on the page

If you are using dhtmlx.js - locate in it
this.xmlDoc.setRequestHeader(‘Content-type’, ‘application/x-www-form-urlencoded’);
and replace with
this.xmlDoc.setRequestHeader(‘Content-type’, ‘application/x-www-form-urlencoded;charset=utf8’);

thank u. i love u. lol

last question
I want to make a link in the tree menu.
But in dataprocessor dp.getUserData dp.setUserData and I do not know how to use.
Create a db on that table to write on is doing??? or whether other way?
How to make me a link please let me know how to use or dp.setUserData.

I’m not quite sure which scenario you want to implement.
On server side you can use beforeRender event and call $data->set_userdata($name, $value); from it to assign some custom data for the item.

On client side you can use “onClick” event handler to assign any custom js code, which will be triggered by click on a tree’s item.