Query Editor not updating query

#1

Hi Guys - brand new node red use I intsalled ODBC driver UNixODBC and it works using node-odbc

I wanted to use node-red-contrib-odbc to connect to sybase and run a query

However I have the following l- the query cannot be edited - this may be the issue and that is where I need your help - and if you do help I will contribute as much as I can ...going forward

31 Jul 19:05:11 - [error] [ODBC:ODBC-SYBASE] Error: [unixODBC][Driver Manager]Invalid string or buffer length
31 Jul 19:07:20 - [error] [ODBC:ODBC-SYBASE] Error: [unixODBC][Driver Manager]Invalid string or buffer length

#2

#3

I don't understand what you mean by that.

#4

Do you mean the query field in the edit dialog doesn't let you edit it?

Can you use check the browser JavaScript console for any errors? What browser etc are you using? Does the function node work okay?

#5

Yes , than]ks that exactly what I mean: the node works fine apart from the fact I cannot enter a query in the editor

In the javascript console (thanks for the hint)

oneditprepare 3e6ba02a.7781e ODBC ReferenceError: require is not defined
red.min.js:16 oneditprepare 669eefef.c7182 ODBC ReferenceError: require is not defined
red.min.js:16 oneditsave 669eefef.c7182 ODBC TypeError: Cannot read property 'getText' of undefined
red.min.js:16 oneditprepare 3e6ba02a.7781e ODBC ReferenceError: require is not defined
red.min.js:16 oneditsave 3e6ba02a.7781e ODBC TypeError: Cannot read property 'getText' of undefined
red.min.js:16 oneditprepare 3e6ba02a.7781e ODBC ReferenceError: require is not defined

The only reference require I see in gthe code looks at an orion editor widget ... I think this might be issue
the gettext

var that = this;
require(["orion/editor/edit"], function(edit) {
that.editor = edit({
parent:document.getElementById('node-input-query-editor'),
lang:"text",
showLinesRuler:false,
showFoldingRuler:false,
contents: ("#node-input-query").val() }); ("#node-input-name").focus();
});
},
oneditsave: function() {
$("#node-input-query").val(this.editor.getText());
delete this.editor;
}

#6

Looks like the node is simply broken. Check its GitHub page for any known issues.

#7

yep i did - the guy who wrote it doesnt support it - i could get philisophical on that but practically speaking its an available module to install so I should at least try to fix it

my guess is that the orion editor wiidet is no longer supported so some pointers or links on how to swap it for another widget ...looks like this node node-red-contrib-odbc got left behind with progress ...

#8

ok i managed to unhide the query field to get this working - i also included the reference to to the orio tet editor - although im not happy abour injecting js from another site but I need some advice on how to swap out this editor widget for a newer one

#9

Hi so loolkiong at node-red-contrib-msql there seems to be a RED.editor any ideas how to incorporate

#10

Better to look at the built in function node or template node. They both have editors that use the built in libraries.

#11

Thanks for the hint - this is day 1 1/2 for me so it all helps - still its realy great got a bunch of rest services going day 1 amazing

#12

would be great if you could fix that node and either offer it back to the author if they want to accept it - or to republish under a slightly newer name.
Thanks for looking at it.

#13

almost there just have to figure out how to get rid of that annoying x

#14

You need to set the editor mode to sql rather than JavaScript so the syntax parser doesn’t complain

#15

ok i got this sucker working - i can put up the code but its day 3 i cant be the mama for all this broken code