Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


MySQL DB Connection - VBScript [Updated]

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

 

 
  
  Printable Version
All Forums >> [Scripting] >> Post a VBScript >> MySQL DB Connection - VBScript [Updated]
  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 DB Connection - VBScript [Updated] - 7/19/2006 5:11:31 PM   
  NssB

 

Posts: 30
Score: 0
Joined: 6/25/2006
Status: offline
Hi all,

Short piece of code this time demonstrating a MySQL connection with VBScript.
Script makes use of Local DSN.

Substitute your own DSN name in the DBConnect function. (objDB.open "portal")
And obviously substitute your own Table name ("SELECT * FROM martin")

[Update]:
I'd like to extend my thanks to ehvbs for his PM x2( it was quite long ;) - I was shown a more 'conventional' approach for extracting DB data.
Please review the following.




      

< Message edited by NssB -- 7/20/2006 10:07:55 PM >


_____________________________

Its all about the code!
 
 
Revisions: 1 | Post #: 1
 
 RE: MySQL DB Connection - VBScript [Updated] - 11/1/2006 8:43:07 PM   
  buffi

 

Posts: 87
Score: 0
Joined: 3/28/2005
From:
Status: offline
Hi All,
Thanks for the script.  I tried to work with it but i am getting the following error.
I have created the ODBC DSN connection and the user for the DB is sa with Null password.
In the ODBC test everything is working fine. TEST SUCCESSFULL
and when i try to run the script this is the error i get.
Can anybody point me what am i doing wrong?
I also need to now if there is a script that will create an automatic ODBC connection.

Line 32
Char 3
Error: [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection
Code: 80040E4D



Regards,
Buff

(in reply to NssB)
 
 
Post #: 2
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> Post a VBScript >> MySQL DB Connection - VBScript [Updated] 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