Last post Dec 28, 2008 06:32 PM by Luis Ramirez Mx
Dec 21, 2008 09:10 PM|kekewong|LINK
Dec 22, 2008 02:03 AM|Mikesdotnetting|LINK
You have an embedded space in the field name for Books Ordered, and you haven't delimited the DateTime field correctly.
That's a probem you get when concatenating values into SQL. You should use parameters:
Also, you should use the Access built-in function Now() in your SQL:
Dec 28, 2008 06:32 PM|Luis Ramirez Mx|LINK
Just as advice, you can improve your code in order to minimize errors and save time debugging applications. Try to use parameters and not concatenating strings, it is safer preventing SQL injection. Actually I would suggest that you test your SQL code alone
and not in your application code so you can be sure that your SQL code is running OK. I would recommend you to use
ADO.NET Accelerator. It has a SQL editor where you can create your queries, set its parameters and finally test your query at design-time.
ADO.NET Accelerator is a commercial software but it has a free version for OleDb data provider. You can use ADO.NET Accelerator to work with Access for free. Try it, I bet you that it will help you a lot.