Thanks for all previous help! I have a question regarding av script.
My computers is all XP, and needs the following when I do my thing :
I have 2 ODBC-connections (towards MS-SQL-DB), which I have a username / password to create a connection to.
Does anyone have any advice on how to accomplish this? Either in a batch-script or otherwise.
I'll recomend to use Windows Scripting (WSH) or Windows powerShell.
The reason are:
There's many Web with sample scripts, and a blog of microsoft with a lot of information: Scripting Web And they provide a free tool to help you in programming and with a lot of examples: Scriptomatic 2.0
And now, the Solution.
First of all, you need
Mysql ODBC driver
installed in the XPThen, Here's a link of a sample code, that explain how works and that you can configure to your needs.
Example Script
For executing those scripts, simply open a CMD window and use the command:
cscript script.vbs
As you can see, the solution is in the same web that told before, there's a huge database and can do anything with them.
Hope this helps.
What do you need to do?
If all you have to do is to check if both databases are in good condition then write simple program that checks that. You can use Python with
odbc
module; it is already included if you use Python from ActiveState: http://www.activestate.com/activepython/downloadsYou test script can look like:
Of course you can use such program from .bat
and in program use connect string from command line:
odbc.odbc(sys.argv[1])
(in such case you must alsoimport sys
)