|
-
Data type mismatch using date() function
I know where the problem is but i just cannot get past it, please help me and tell me why I get the error message:
Microsoft JET Database Engine (0x80040E07)
Data type mismatch in criteria expression. (line 71)
<%
dim vendmsg
dim messagedate
dim sql
dim idnumber
rs.source = "SELECT * FROM Messages WHERE VendNum = '" & VendNumb & "';"
rs.open()
do while not rs.eof
if rs.recordcount > 0 then
idnumber = rs("IDNum")
vendmsg = rs("Message")
messagedate = rs("DateCreated")
todaysdate = date()
rs.close
sql = "UPDATE Messages SET DateDisplayed = '" & todaysdate & "' WHERE VendNum = '" & VendNumb & "' AND IDNum = '" & idnumber & "';"
rs.open(sql)
else
vendmsg = "You have no new messages."
messagedate = date
end if
response.Write("<font color=#cc0000 size=4 face=Georgia>" & messagedate & "<BR>" & vendmsg & "<BR><br>")
rs.movenext()
loop
%>
Similar Threads
-
By Phil Weber in forum .NET
Replies: 67
Last Post: 12-15-2002, 01:37 AM
-
Replies: 0
Last Post: 10-11-2002, 10:52 AM
-
By Scott in forum VB Classic
Replies: 12
Last Post: 12-21-2001, 04:21 PM
-
Replies: 1
Last Post: 11-27-2001, 06:53 AM
-
By Shlomo in forum VB Classic
Replies: 2
Last Post: 09-07-2001, 11:36 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks