Is this possible?

Anything VBScript-related, including Windows Script Host, WMI, ADSI, and more.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Locked
User avatar
cwevenson
Posts: 6
Joined: Mon Feb 23, 2009 1:17 am

Is this possible?

Post by cwevenson »

A manager has asked that I look into if a VB script could draw out and present numbers from an access database if the script in turn linked up and ran a query in that database.

Is this possible to do? Could I call this query and then in a message box present the resulting values from that query?

The manager wants to find Year to Date and month to date without having to open the database, run the report and get the numbers.


User avatar
rasimmer
Posts: 182
Joined: Fri Jan 30, 2009 12:37 am

Is this possible?

Post by rasimmer »

Yes you can. You would use ADO to connect to the DB and do a query. Something like (http://www.netstumbler.org/f24/simple-v ... ase-18601/):

Code: Select all

	Set MyConn = CreateObject("ADODB.Connection")
	MyConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:Program FilesNetwork Stumbleraps.mdb"
	Set RS = MyConn.Execute("SELECT * FROM APs WHERE BSSID = '" & BSSID & "'")
	

You should be able to get plenty of examples searching for something like: http://www.lmgtfy.com/?q=VBScript+ADO+Microsoft+Access

User avatar
rasimmer
Posts: 182
Joined: Fri Jan 30, 2009 12:37 am

Is this possible?

Post by rasimmer »

Also, there are much cooler ways to display data than a Msgbox, that's returning data in it's simplest form (for me debugging). You can use a HTA or even InternetExplorer.Application to display the output in HTML format and use company logos, etc. to make it look professional and earn yourself a raise :oP

Locked