I need to be able to access Access databases, preferably using SQL statements, from Microsoft Visual C 6.0.
I have found plenty of references to using ADO and ODBC from Visual Basic, C++, and C#, but nothing for C.
I tried including "adoint.h" and linking "adoid.lib", but it would not compile- it had numerious errors caused by adoint.h.
I tried loading ADO as a DLL:
hado=LoadLibrary("msado15.
dll");
if(hado==NULL)
MessageBox(NULL,"LoadLibra
ry Failed.","Cannot load Library msado15.dll.", MB_OK|MB_ICONINFORMATION);
else
{
MessageBox(NULL,"LoadLibra
ry Success!","loaded Library msado15.dll just fine.", MB_OK|MB_ICONINFORMATION);
FreeLibrary(hado);
}
This works if I put the DLL in the same folder as my program, but I can't find a list of the functions in msado15.dll to call, or if it is dependant on any other files, and if all versions of windows even have it, if it is redistributable, and where it is normaly installed.
Plus, I assume there must be a simpiler way to go, since it is so easy to do in other languages and tools.
Start Free Trial