Print Page | Close Window

MySQL error

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=13652
Printed Date: 30 March 2026 at 1:26pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: MySQL error
Posted By: XTGeminiman
Subject: MySQL error
Date Posted: 04 February 2005 at 3:23pm
I'm getting the following error...

Microsoft OLE DB Provider for ODBC Drivers error '80040e21'

Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.

/consoletopmainie.asp, line 39

I just transferred from Access to MySQL and I'm getting errors. I think it might have something to do with the connection script but the script works fine on another page. Could it be the MySQL table structure itself? It's a datetime field.

Anyway, here's my coding...

(connection script)

<%
Dim conn, source

Source = "DRIVER={MySQL ODBC 3.51 Driver};Server=192.168.14.188;UID=vgameforcecom;PWD=maggie;database=vgameforcecom;PORT=3306;Op tion=16386"
Set conn = Server.CreateObject("ADODB.Connection")
conn.open Source
%>

Line 39 is the last line here

<%
Option Explicit
Dim sql,username,rscurrent,id,points,rsUser,rsusercount,rstheme,rsMessages,newcount,rank,stage1,total,co nsole,keywordstowrite
console="gf"
id=request.querystring("id")
username = Request.Cookies("username")
total=0
%>
<!--#include file="connie.asp"-->
<%
sql = "SELECT Messages.* FROM Users INNER JOIN Messages ON Users.username = Messages.sentfrom WHERE sendto = '" & username & "' ORDER BY datesent DESC"
Set rsMessages = Server.CreateObject("ADODB.Recordset")
rsMessages.Open sql, conn, 3, 3

sql = "SELECT * FROM usercount"
Set rsusercount = Server.CreateObject("ADODB.Recordset")
rsusercount.Open sql, conn, 3, 3

sql = "SELECT * FROM theme WHERE username = '" & username & "'"
Set rstheme = Server.CreateObject("ADODB.Recordset")
rstheme.Open sql, conn, 3, 3

sql = "SELECT * FROM users"
Set rscurrent = Server.CreateObject("ADODB.Recordset")
rscurrent.Open sql, conn, 3, 3
%>
<%'If the username cookie is set, they must have logged in, so get their details from the database
if username <> "" then

if username = "SL500" then
response.redirect("http://www.google.com")
end if

  sql = "SELECT * FROM Users WHERE username = '" & username & "'"
  Set rsUser = Server.CreateObject("ADODB.Recordset")
  rsUser.Open sql, conn, 3, 3

    rsuser("lol")=now()
  rsUser.Update



Replies:
Posted By: zaboss
Date Posted: 05 February 2005 at 3:33am
AFAIK MySQL doesn't support inner joins in his stable versions. Please check wether your mySQL version support inner joins. If you think  isn't that, but the date/time field, be sure you format date/time mySQL way before as it is very specific about that. It must be yyyy-mm-dd.


-------------
Cristian Banu
http://www.soft4web.ro - Soft 4 web


Posted By: XTGeminiman
Date Posted: 05 February 2005 at 6:27pm
how do i format mysql to go yyyy-mm-dd? or do i do you mean do that in the ASP form. Also, is there any way to have the time? I'm kinda confused by your post.


Posted By: zaboss
Date Posted: 06 February 2005 at 6:56am
What I do is to control the input of dates and not letting the user mix things up. I always use a form for year, a form for  month and a form for day. It's easy for the user too as he only need to chose from a drop down form.
If it isn't a user input, I use the DatePart function to format it.
Also when pulling out fron the db, I use DatePart too to display it the way I need.


-------------
Cristian Banu
http://www.soft4web.ro - Soft 4 web



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net