Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - MySQL error
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

MySQL error

 Post Reply Post Reply
Author
XTGeminiman View Drop Down
Newbie
Newbie


Joined: 04 February 2005
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote XTGeminiman Quote  Post ReplyReply Direct Link To This Post Topic: MySQL error
    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
Back to Top
zaboss View Drop Down
Senior Member
Senior Member


Joined: 20 August 2002
Location: Romania
Status: Offline
Points: 454
Post Options Post Options   Thanks (0) Thanks(0)   Quote zaboss Quote  Post ReplyReply Direct Link To This Post 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.


Edited by zaboss - 05 February 2005 at 3:35am
Cristian Banu
Soft 4 web
Back to Top
XTGeminiman View Drop Down
Newbie
Newbie


Joined: 04 February 2005
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote XTGeminiman Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
zaboss View Drop Down
Senior Member
Senior Member


Joined: 20 August 2002
Location: Romania
Status: Offline
Points: 454
Post Options Post Options   Thanks (0) Thanks(0)   Quote zaboss Quote  Post ReplyReply Direct Link To This Post 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
Soft 4 web
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.