Herivelton
Systems Engineer
Dear,
Please, I need from a .VBS file (inventory.vbs) to connect to a MySQL Database on my local network, but I do not know how to do this, could you help me?
MySQL Server IP: 192.168.30.5
Login: root
Password: 1234
Door: 3306
I tried the following but it does not work:
When I run the "Inventory.vbs" file, an MS-Windows window appears with the following error message:
Line 29 to which the error message refers is:
Just as observation, the MySQL server is hosted on a "Linux - Ubuntu".
At first, for testing purposes only, I'm trying to write only basic information in the database, but as soon as it works, I'll enter a lot of other information.
I will upload the "Inventory.vbs" file together with the Windows Server 2008 Logon Script. This way, whenever the user logs in, the Hardware and Software information will be updated in the Database.
The goal is just to take inventory of hardware and software.
My name is Herivelton, I am from Brazil and my level of fluence in English Language is not very high, so I apologize for any errors in the spelling or in the text.
Thanks to whoever can help me ...
Herivelton
herfranpi@gmail.com
Please, I need from a .VBS file (inventory.vbs) to connect to a MySQL Database on my local network, but I do not know how to do this, could you help me?
MySQL Server IP: 192.168.30.5
Login: root
Password: 1234
Door: 3306
I tried the following but it does not work:
Code:
Dim rs, strConnectString, strSQL
Set rs = CreateObject("ADODB.Recordset")
strConnectString = "DRIVER={MySQL ODBC 3.51 Driver};Server=192.168.30.5;UID=root;Password=1234;Database=invetario;Option=3"
rs.ActiveConnection = strConnectString
strSQL = "INSERT INTO equipamento (hostname, dt_ultimoLogin) VALUES ('UIT-TI06', now()) ON DUPLICATE key update dt_ultimoLogin = now();"
rs.Open strSQL
Wscript.Quit
When I run the "Inventory.vbs" file, an MS-Windows window appears with the following error message:
Line 29 to which the error message refers is:
Code:
rs.ActiveConnection = strConnectString
Just as observation, the MySQL server is hosted on a "Linux - Ubuntu".
At first, for testing purposes only, I'm trying to write only basic information in the database, but as soon as it works, I'll enter a lot of other information.
I will upload the "Inventory.vbs" file together with the Windows Server 2008 Logon Script. This way, whenever the user logs in, the Hardware and Software information will be updated in the Database.
The goal is just to take inventory of hardware and software.
My name is Herivelton, I am from Brazil and my level of fluence in English Language is not very high, so I apologize for any errors in the spelling or in the text.
Thanks to whoever can help me ...
Herivelton
herfranpi@gmail.com