MySQL - vb.net: error in naamruimte line 0
MySQL - vb.net: error in naamruimte line 0
Ik probeer een .vb script te draaien om devicevalues in een MySQL database te zetten, maar met welk ander voorbeeld dan ook van internet, ik krijg altijd dezelfde foutmelding (laat staan dat er een connectie gemaakt wordt): "Script compile error: De instructie is niet geldig in een naamruimte.on line 0"
Welke variant van onderstaande namespace(s) ik ook gebruik, het maakt niet uit.
Imports MySql.Data.MySqlClient
en evt:
Imports System.Data
Ik gebruik Mysql connector 5.2.7 en heb ook "MySql.Data.dll" naar de HSPRO map gekopieerd.
Via php heb ik nergens problemen mee, zowel Xampp met sql en php als Homeseer draaien op dezelfde pc.
Het script statusCallBack.vb uit het topic domoticaforum.eu/viewtopic.php?f=47& ... sql#p62780 geeft exact dezelfde error, net zoals al die vele andere voorbeelden van internet, die in principe allen met dezelfde namespaces beginnen.
Wat zie ik over 't hoofd?
Welke variant van onderstaande namespace(s) ik ook gebruik, het maakt niet uit.
Imports MySql.Data.MySqlClient
en evt:
Imports System.Data
Ik gebruik Mysql connector 5.2.7 en heb ook "MySql.Data.dll" naar de HSPRO map gekopieerd.
Via php heb ik nergens problemen mee, zowel Xampp met sql en php als Homeseer draaien op dezelfde pc.
Het script statusCallBack.vb uit het topic domoticaforum.eu/viewtopic.php?f=47& ... sql#p62780 geeft exact dezelfde error, net zoals al die vele andere voorbeelden van internet, die in principe allen met dezelfde namespaces beginnen.
Wat zie ik over 't hoofd?
My home automation blog: https://rutg3r.com
Re: MySQL - vb.net: error in naamruimte line 0
I still don't know how to fix this namespace error. I tackled the problem with a seperate php file, which retrieve via DCOM the necessary Homeseer data and write it into MySQL.
Via Task manager there is a recurring event that run the php file. Just like a cronjob.
Via Task manager there is a recurring event that run the php file. Just like a cronjob.
My home automation blog: https://rutg3r.com
Re: MySQL - vb.net: error in naamruimte line 0
I think this issue has something to do with
http://www.rutg3r.nl/store-homeseer-dev ... nto-mysql/
Because i can`t seem to get it working like you placed it on you`re blog
I have placed MySql.Data.dll in c:\Program Files\HomeSeer HS3\ (extracted from http://dev.mysql.com/downloads/connector/net/1.0.html) but i also trief different versions
http://www.rutg3r.nl/store-homeseer-dev ... nto-mysql/
Because i can`t seem to get it working like you placed it on you`re blog
I have placed MySql.Data.dll in c:\Program Files\HomeSeer HS3\ (extracted from http://dev.mysql.com/downloads/connector/net/1.0.html) but i also trief different versions
Code: Select all
dec-16 15:03:10 Error Compiling script MySQL_Devices.vb: Type 'MySqlException' is not defined.
dec-16 15:03:10 Error Compiling script MySQL_Devices.vb: Type 'MySqlDataReader' is not defined.
dec-16 15:03:10 Error Compiling script MySQL_Devices.vb: Type 'MySqlDataAdapter' is not defined.
dec-16 15:03:10 Error Compiling script MySQL_Devices.vb: Type 'MySqlConnection' is not defined.
dec-16 15:03:10 Error Compiling script MySQL_Devices.vb: Type 'MySqlCommand' is not defined.
dec-16 15:03:10 Error Compiling script MySQL_Devices.vb: Type 'MySqlConnection' is not defined.
dec-16 15:03:10 Error Compiling script MySQL_Devices.vb: Namespace or type specified in the Imports 'MySql.Data.MySqlClient' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases.
dec-16 15:03:10 Error Compiling script MySQL_Devices.vb: Namespace or type specified in the Imports 'System.Core' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases.
Running HS3PRO on PC with Z-Wave / OpenTherm / Plugwise / RFXcom / MQTT / XAP400 / Logitech Media Server and Squeezelite on PI`s
Re: MySQL - vb.net: error in naamruimte line 0
I have to check the Mysql version tonight when Im at home. At the moment I dont have this above issue anymore.
My home automation blog: https://rutg3r.com
Re: MySQL - vb.net: error in naamruimte line 0
Please do, and also tell me where to place the fileRutger wrote:I have to check the Mysql version tonight when Im at home. At the moment I dont have this above issue anymore.

I currently have "Product version 1.0.10.0"
Running HS3PRO on PC with Z-Wave / OpenTherm / Plugwise / RFXcom / MQTT / XAP400 / Logitech Media Server and Squeezelite on PI`s
Re: MySQL - vb.net: error in naamruimte line 0
I'm running a XAMPP server, version 5.6.8-0 (not the lastest version).
MySQL version 5.6.24
Phpmyadmin version 4.3.11
Apache/2.4.12 (Win32) OpenSSL/1.0.1l PHP/5.6.8
I've a "MySql.Data.dll" (v6.9.5) in the root of the HS3 folder.
There are no other Mysql dll files in HS3.
In HS3\Config\Setting.ini, you have define the Mysql dll:
"ScriptingReferences=MySql.Data.MySqlClient;MySql.Data.dll"
Attached the dll file and another Mysql script to upload values into MySQL.
MySQL version 5.6.24
Phpmyadmin version 4.3.11
Apache/2.4.12 (Win32) OpenSSL/1.0.1l PHP/5.6.8
I've a "MySql.Data.dll" (v6.9.5) in the root of the HS3 folder.
There are no other Mysql dll files in HS3.
In HS3\Config\Setting.ini, you have define the Mysql dll:
"ScriptingReferences=MySql.Data.MySqlClient;MySql.Data.dll"
Attached the dll file and another Mysql script to upload values into MySQL.
- Attachments
-
- MySql.Data.zip
- (173.25 KiB) Downloaded 702 times
Last edited by Rutger on Fri Dec 16, 2016 11:48 pm, edited 1 time in total.
My home automation blog: https://rutg3r.com
Re: MySQL - vb.net: error in naamruimte line 0
No success so far 
"ScriptingReferences=MySql.Data.MySqlClient;MySql.Data.dll"
or
ScriptingReferences=MySql.Data.MySqlClient;MySql.Data.dll
makes no difference

"ScriptingReferences=MySql.Data.MySqlClient;MySql.Data.dll"
or
ScriptingReferences=MySql.Data.MySqlClient;MySql.Data.dll
makes no difference
Running HS3PRO on PC with Z-Wave / OpenTherm / Plugwise / RFXcom / MQTT / XAP400 / Logitech Media Server and Squeezelite on PI`s
Re: MySQL - vb.net: error in naamruimte line 0
I struggled for a very long time to get the Mysql vs. vb.NET working. It's already a long time ago I managed to get it working. I thought it was related to the version of the Mysql.dll. I made a type in the version number in my previous post, it should be (and I changed it already to) 6.9.5, but I'm definitely not on ver 1.0*.
https://downloads.mysql.com/archives/c-net/
https://downloads.mysql.com/archives/c-net/
My home automation blog: https://rutg3r.com
Re: MySQL - vb.net: error in naamruimte line 0
Oja, did you restart after made the changes in settings.ini?
My home automation blog: https://rutg3r.com
Re: MySQL - vb.net: error in naamruimte line 0
JupRutger wrote:Oja, did you restart after made the changes in settings.ini?


Code: Select all
ec-16 23:09:07 Error Compiling script MySQL_Devices.vb: Type 'MySqlException' is not defined.
dec-16 23:09:07 Error Compiling script MySQL_Devices.vb: Type 'MySqlDataReader' is not defined.
dec-16 23:09:07 Error Compiling script MySQL_Devices.vb: Type 'MySqlDataAdapter' is not defined.
dec-16 23:09:07 Error Compiling script MySQL_Devices.vb: Type 'MySqlConnection' is not defined.
dec-16 23:09:07 Error Compiling script MySQL_Devices.vb: Type 'MySqlCommand' is not defined.
dec-16 23:09:07 Error Compiling script MySQL_Devices.vb: Type 'MySqlConnection' is not defined.
dec-16 23:09:07 Error Compiling script MySQL_Devices.vb: Namespace or type specified in the Imports 'MySql.Data.MySqlClient' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases.
dec-16 23:09:07 Error Compiling script MySQL_Devices.vb: Namespace or type specified in the Imports 'System.Core' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases.
Note: i`m running windows 10
Running HS3PRO on PC with Z-Wave / OpenTherm / Plugwise / RFXcom / MQTT / XAP400 / Logitech Media Server and Squeezelite on PI`s
Re: MySQL - vb.net: error in naamruimte line 0
My HS3 is running on W8, but that should not be the issue I guess. what are you compiling? That are not normal HS log entries, right? is it for a plugin?
My home automation blog: https://rutg3r.com
Re: MySQL - vb.net: error in naamruimte line 0
Yeah it is working 
The scripting reference was placed in the last line of settings.ini and therefore it was not included in the settings.
Thanks for the support!!
Now let`s find out how to get the AUTO_INCREMENT in the mysql table

The scripting reference was placed in the last line of settings.ini and therefore it was not included in the settings.
Thanks for the support!!
Now let`s find out how to get the AUTO_INCREMENT in the mysql table

Code: Select all
ALTER TABLE devices MODIFY COLUMN id INT auto_increment
Running HS3PRO on PC with Z-Wave / OpenTherm / Plugwise / RFXcom / MQTT / XAP400 / Logitech Media Server and Squeezelite on PI`s