Syntax error in INSERT INTO statement for Access 2010

PASSWORD is a reserved word in Access SQL, so you need to wrap that column name in square brackets. You really should use a parameterized query to protect against SQL Injection and generally make your life easier. Try something like this SQL = “INSERT INTO [Accounts] ([StudNo],[Password],[FirstName],[LastName],[YrandSec]) ” & _ “VALUES (?, ?, ?, ?, … Read more

FileDialog doesn’t work

The FileDialog object is not provided by the Access library, but by the Office library. So your code should work if you set a reference to the Microsoft Office [version number] Object Library. Either you don’t have that reference set, or it’s broken. However if it were me, I would leave the reference unset and … Read more

Convert Access image OLE Object into raw image byte array in C#

The problem here is that the imbedded image was not a simple BMP or JPEG. It was a Microsoft Word Picture and the OLE header information was considerably larger than the 300 byte window of the original GetImageBytesFromOLEField() code. (That is, after scanning 300 bytes it just gave up with “Unable to determine header size…”.) … Read more

Difference between Microsoft.Jet.OleDb and Microsoft.Ace.OleDb

It’s mainly a matter of history, effectively ACE has superceded JET: Wikipedia answers your question in great detail. The most relevant sections are: With version 2007 onwards, Access includes an Office-specific version of Jet, initially called the Office Access Connectivity Engine (ACE), but which is now called the Access Database Engine. This engine is fully … Read more

Is it possible to pass parameters programmatically in a Microsoft Access update query?

I just tested this and it works in Access 2010. Say you have a SELECT query with parameters: PARAMETERS startID Long, endID Long; SELECT Members.* FROM Members WHERE (((Members.memberID) Between [startID] And [endID])); You run that query interactively and it prompts you for [startID] and [endID]. That works, so you save that query as [MemberSubset]. … Read more