Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


MySQL

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,62504
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> MySQL
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 MySQL - 7/19/2008 12:56:01 PM   
  h0dg3s

 

Posts: 2
Score: 0
Joined: 7/19/2008
Status: offline
Can anyone tell me how to make a simple vbscript to run on the local machine and select one field from a table in a MySQL database running on a remote computer?  All of the examples I see are either meant to have MySQL running on the local machine, or else are run through ASP.NET.  Basically I want it to use the MAC address as criteria to pull the name the computer's supposed to have and renames it.  I already know how to pull the MAC address and also rename the machine both with vbscript, it's just the database part that I need help with.  Thanks in advance.

Edit: as an afterthought, it would also help if in case it fails to read from the database, it waits a random amount of time between 1 and 60 seconds and tries again (in case the database gets overloaded)

< Message edited by h0dg3s -- 7/19/2008 1:01:58 PM >
 
 
Post #: 1
 
 RE: MySQL - 7/19/2008 1:06:38 PM   
  dm_4ever


Posts: 2664
Score: 46
Joined: 6/29/2006
From: Orange County, California
Status: offline
ADODB and a connection string should be all you need...there's plenty of examples about accessing databases...the only difference for you should be the connection string....

http://www.connectionstrings.com/?carrier=mysql

_____________________________

dm_4ever

My philosophy: K.I.S.S - Keep It Simple Stupid
Read Me: http://www.visualbasicscript.com/m_24727/tm.htm
Frequently Asked Stuff: http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to h0dg3s)
 
 
Post #: 2
 
 RE: MySQL - 7/19/2008 1:21:04 PM   
  h0dg3s

 

Posts: 2
Score: 0
Joined: 7/19/2008
Status: offline
Thanks for the info but I've already seen that page and have no idea how to implement it.  Do you have another example that can tell me how to actually use that and how to use SELECT and WHERE ?

Edit: I see ot her peoples examples needing some kind of ODBC driver installed locally, but I'm trying to use it as a standalone script without having anything else installed.  FreeBASIC can do it, but I'd rather do it in vb.net  example:  http://pastebin.com/m39583f0c
mysql.bi which is included in that http://pastebin.com/m45b99d5c

Is it possible to do it this way in vb.net?

< Message edited by h0dg3s -- 7/19/2008 4:18:59 PM >

(in reply to dm_4ever)
 
 
Post #: 3
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> MySQL Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts