codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  Date problem!! SQL query - Access DB - ASP VBScript  ricferrer at 13:10 on Friday, June 11, 2004
 

hello,
i would like to start by saying that i am not a real programmer, i try to do some stuff and most of the time it works.. :D, don't ask me how.

I have recently encountered a problem with dates. i get a "Data type mismatch in criteria expression" error.

I am using Access Database, and a text field where the dates are all in this format YYYY-M-D

i think there is a problem with # sign or something, but since i have very little knowledge of ASP i could not understand completely.

here is the code.
Aviso, is the table
PublicarDesde is the text field where the date is in YYYY-M-D format
Solicitud__Username is an irrelevant variable for this issue, but just in case, Ejecutivo is another field, and I'm getting only records that belong to the username in the cookie.



"SELECT * FROM Aviso
WHERE DateValue(PublicarDesde) > DateValue(today)
AND Ejecutivo = '" + Replace(Solicitud__Username, "'", "''") + "'"









CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  Export data to word and create header and footer
•  calling Functions from VC .LIB Files inside VB
•  calling Functions from VC .LIB Files inside VB
•  Function help needed
•  Re: Auto-Populating fields in a form
•  Problem ocureed when i placed my working folder up to the server
•  Problem occured when i placed my working up to the server
•  need to reset array length to zero
•  tellafriend


Recent Articles
ASP.NET Forum Source Code
Internal Search Engine
Javascript Growing Window
Simple date validation
Search engine friendly URLs using ASP.NET (C#.NET)
Function to Return Alpha Characters Only
The OSI Reference Model - A Clear and Concise Illustration !
Understanding Pointers to Functions in C
Application & Session Events in the Global.asax File
Socket Programming in Perl


Site Survey
Help us serve you better. Take a five minute survey. Click here!

© Copyright codetoad.com 2001-2004