Working with VB.NET and MS Access
Writing by Sven on Tuesday, 8 of May , 2007 at 4:24 pm
3 hours on debugging. Whaaat ? Yes, that’s when you work with VB.NET and an Access database.
Let’s give an example :
2 possible bugs can appear :
- The parameters are not set in the right order. Though you give an ID for each parameter (see @), the stored procedure (sorry I mean stored query) still wants them in the exact order.
- The stored query looks for records that have a name that is “like” the given name, so with LIKE [’@name’]. MS Access only accepts * as a wildcard. But on the contrary, in VB.NET you must specify this character with the normal % sign !!
It took me hours to solve this bugs.
I also get upset that MS Access doesn’t accept real stored procedures, so I can’t put some logic into the SQL code. That’s why I have SelectUsersByName and SelectUsersByNameAndRole, in case the role-id is not given.
It’s sad but we must work with these horrible languages, cause the professors “can’t maintain C# and SQL Server is still not for free” (??)..
Category: Uncategorized
- Add this post to
- Del.icio.us -
- Meneame -
- Digg

