Pascal_Temmar Posted October 20, 2005 Posted October 20, 2005 Hi, I have this query SELECT date_recherche, txt_recherche, nb_resultat_recherche, nb_resultat_rubrique, nb_recherche_commune, nb_resultat, ID FROM table1 where date_recherche = "20/10/2005" I would like to change the date "20/10/2005" with a keyword or other instruction. I'm under VB.NET 2005 B2 and I can't find exactly word : I tried = { d }, datetime, date.now but nothing. Thanks a lot in advance for help. Pascal T. New Caledonie Quote
Administrators PlausiblyDamp Posted October 20, 2005 Administrators Posted October 20, 2005 You are probably going to benefit from a parameterised query for this, if you have a search of these forums you should find several examples / topics. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Pascal_Temmar Posted October 21, 2005 Author Posted October 21, 2005 You are probably going to benefit from a parameterised query for this' date=' if you have a search of these forums you should find several examples / topics.[/quote'] In fact, with code I define the exact query. But When I use data designer, I can't insert datetime.now in query. I do not consider it's a parameterised query. But thanks for your answer. Quote
Administrators PlausiblyDamp Posted October 21, 2005 Administrators Posted October 21, 2005 If this is SQL server you could use GETDATE() to get the current date and time. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.