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:
dim adoConn dim adoRS set adoConn = Server.CreateObject("ADODB.Connection") set adoRS = Server.CreateObject("ADODB.Recordset") adoConn.CursorLocation = 3 'adUseClient adoConn.Open "DRIVER={MySQL ODBC 3.51 Driver};SERVER=localhost;DATABASE=users;UID=root;PWD=; OPTION=16427" adoRS.ActiveConnection = adoConn if adoConn.errors.count = 0 then adoRS.Open "Select ...", adoConn ..... adoRS.Close else response.write ("ERROR: Couldn't connect to database") end if adoConn.Close Set adoRS = nothing 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!!
No comments:
Post a Comment