ASK How to read mdb files in node-red ?

1,703 views
Skip to first unread message

Dark Norstein

unread,
Feb 18, 2018, 1:05:27 AM2/18/18
to Node-RED
I want to ask something important here, i try to read mdb files (Microsoft Access database) using node-red . But, why the output of this data is some unique characters ? 
How can i fix this ??

anybody know how to read the data ?

Colin Law

unread,
Feb 18, 2018, 2:38:38 AM2/18/18
to node...@googlegroups.com
How are you reading it? If using a contrib node tell us it's full name.

Colin

--
http://nodered.org
 
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+unsubscribe@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/c46a2149-2df4-49aa-99b9-8d00ddfdeaeb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Dark Norstein

unread,
Feb 18, 2018, 3:32:33 AM2/18/18
to Node-RED
im using : inject -> file(utf8 string) -> csv (tab separator) -> debug 
in the file node i'm insert mdb file that i want to read
and im using windows right now 
so how is it ? 


Pada Minggu, 18 Februari 2018 14.38.38 UTC+7, Colin Law menulis:
How are you reading it? If using a contrib node tell us it's full name.

Colin
On 18 Feb 2018 6:05 a.m., "Dark Norstein" <email.n...@gmail.com> wrote:
I want to ask something important here, i try to read mdb files (Microsoft Access database) using node-red . But, why the output of this data is some unique characters ? 
How can i fix this ??

anybody know how to read the data ?

--
http://nodered.org
 
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.
up1.JPG
up2.JPG

Norse Network

unread,
Feb 18, 2018, 3:43:36 AM2/18/18
to node...@googlegroups.com
and is there any way to convert mdb file into other file extension in node red ? like convert this mdb file into XML , csv, json , or something like that ? 
Thanks Mr. Colin

You received this message because you are subscribed to a topic in the Google Groups "Node-RED" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/node-red/PNk021ozTqg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to node-red+unsubscribe@googlegroups.com.

To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.

Colin Law

unread,
Feb 18, 2018, 4:20:19 AM2/18/18
to node...@googlegroups.com
You cannot just read the file in as if it were a text file, you need to read it with something that understands Access databases.  If you were on Linux I think you could use node-red-contrib-odbc, but I see you are using Windows so that may not help.  I don't use Windows so can't really help other than to suggest Googling for it, but having had a quick look myself I didn't see anything that looks particularly helpful.  Maybe someone else here can help.

Depending on what you are trying to do then possibly you could export the data of interest as a CSV file and read that into node-red.

Personally I would advise not to use Access and not to use Windows but I realise that may not be much help to you.

Colin

Dark Norstein

unread,
Feb 18, 2018, 5:10:56 AM2/18/18
to Node-RED
Yeah it's looks like little hard if we are using it on windows ,
so .. sir from your answer i should convert it to another file extension before process it on node-red if we are using windows ?

Pada Minggu, 18 Februari 2018 16.20.19 UTC+7, Colin Law menulis:
You cannot just read the file in as if it were a text file, you need to read it with something that understands Access databases.  If you were on Linux I think you could use node-red-contrib-odbc, but I see you are using Windows so that may not help.  I don't use Windows so can't really help other than to suggest Googling for it, but having had a quick look myself I didn't see anything that looks particularly helpful.  Maybe someone else here can help.

Depending on what you are trying to do then possibly you could export the data of interest as a CSV file and read that into node-red.

Personally I would advise not to use Access and not to use Windows but I realise that may not be much help to you.

Colin
On 18 February 2018 at 08:43, Norse Network <email.n...@gmail.com> wrote:
and is there any way to convert mdb file into other file extension in node red ? like convert this mdb file into XML , csv, json , or something like that ? 
Thanks Mr. Colin
2018-02-18 14:38 GMT+07:00 Colin Law <cla...@gmail.com>:
How are you reading it? If using a contrib node tell us it's full name.

Colin
On 18 Feb 2018 6:05 a.m., "Dark Norstein" <email.n...@gmail.com> wrote:
I want to ask something important here, i try to read mdb files (Microsoft Access database) using node-red . But, why the output of this data is some unique characters ? 
How can i fix this ??

anybody know how to read the data ?

--
http://nodered.org
 
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.

To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/c46a2149-2df4-49aa-99b9-8d00ddfdeaeb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
http://nodered.org
 
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to a topic in the Google Groups "Node-RED" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/node-red/PNk021ozTqg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to node-red+u...@googlegroups.com.

To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.

--
http://nodered.org
 
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.

To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.

Garry Hayne

unread,
Feb 18, 2018, 5:33:55 AM2/18/18
to Node-RED
As Colin said, ODBC is probably the best bet. .MDB files are a container for the complete database (Tables, stored procedures, reports etc) .
You might try exporting to .CSV and then using a csv node to read it.

Garry

Colin Law

unread,
Feb 18, 2018, 6:06:34 AM2/18/18
to node...@googlegroups.com
It is not a matter of changing the file extension, the extension is just a clue for s/w to know what is inside the file. You need to use some software than understands access databases.

Colin

To unsubscribe from this group and stop receiving emails from it, send an email to node-red+unsubscribe@googlegroups.com.

To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.

Julian Knight

unread,
Feb 26, 2018, 2:27:04 PM2/26/18
to Node-RED
If you are running on Windows, things get a little weird. It should be EASIER on Windows but it isn't :(

While there are some node.js modules for accessing MS Access databases on Windows, none have yet been translated to Node-RED.

The 2 most likely candidates are:
These are 2 very different approaches. The first can probably be referenced in Node-RED and consumed directly getting a query into JSON in a function node.

The second allows you access to .net from within Node.JS so is more comprehensive but more complex. However, if you know C# or PowerShell, edge.js allows you use native .net. You could, of course, exec a PowerShell command to get data from an MDB file pretty easily but then you would have to get the data back into Node-RED which edge.js does for you.

I also note that, by default, my installation of Windows 10 comes with no ODBC driver for MS Access even though I have Office 365 Pro Plus installed which includes access. This means that I can't tell if node-red-contrib-odbc for example will actually work on Windows.

Julian Knight

unread,
Feb 26, 2018, 3:51:47 PM2/26/18
to Node-RED
Just did a quick test on edge.js - you need to install edge-js and edge-ps to get native powershell support ("edge-js" not "edge" as edge-js supports newer versions of Node.js).

I added a require to settings.js

functionGlobalContext: {
edge: require('edge-js'),
},

And then added the hello world example to a function node:

var edge = global.get('edge');

var helloWorld = edge.func(function () {/*
    async (input) => {
        return ".NET Welcomes " + input.ToString();
    }
*/
});

helloWorld
('JavaScript', function (error, result) {
   
if (error) throw error;
    console
.log(result);
    msg
.payload = result;
    node
.send(msg)
});

Grrr!!! From MS: "On a 64-bit computer, you must run packages that connect to Microsoft Access data sources in 32-bit mode. Both the Microsoft Jet OLE DB Provider and the OLE DB provider for the Microsoft Office 12.0 Access Database Engine are only available in 32-bit versions.".

So since I have 64bit Windows and Office installed, I won't be using the OLE DB providers as installing a 32bit version can really mess up Office.

It is still possible to script Access itself to do the job though if you have it installed on the same machine as Node-RED, simply use "New-Object –comObject Access.Application" to get a reference to the application. Time's up for me though so I'm not going any further unless someone REALLY wants help with this.

If nothing else, you now know how to call powershell from Node-RED without having to resort to an exec node. B-{
Reply all
Reply to author
Forward
0 new messages