Thursday, May 25, 2006

Good news from the blogs!!!

Yes, for you replication lovers on MS platform, who had great time with MsSQL and MySQL's replication now Slony (replication engine for PostgreSQL) is here.
See the original blog post by Robert Treat (with installation guide). A prebuilt windows binary is available here.

Friday, May 05, 2006


Seems there is some interest in running MySQL as a backend for (classic) ASP based sites, at least looking at recent posts on DevShed forums.
As questions are quite similar and I've not found a good ASP+MySQL tutorial on the web I'm posting a short example here
Here is my snippet:

  1. dim adoConn
  2. dim adoRS
  3. set adoConn = Server.CreateObject("ADODB.Connection")
  4. set adoRS = Server.CreateObject("ADODB.Recordset")
  5. adoConn.CursorLocation = 3
  6. 'adUseClient
  7. adoConn.Open "DRIVER={MySQL ODBC 3.51 Driver};SERVER=localhost;DATABASE=users;UID=root;PWD=; OPTION=16427"
  8. adoRS.ActiveConnection = adoConn
  9. if adoConn.errors.count = 0 then
  10. adoRS.Open "Select ...", adoConn
  11. .....
  12. adoRS.Close
  13. else
  14. response.write ("ERROR: Couldn't connect to database")
  15. end if
  16. adoConn.Close
  17. Set adoRS = nothing
  18. Set adoConn = nothing

And here is an excellent date conversion function by Devshed user.
Note that Mike Hillyer's writings about vb and MySQL are an excellent resource!!

MySQL does it again ... MySQL Forge!!!

Great snippet on Dynamic SQL in stored procedures from MySQLForge!!!