Advertisement

05.02.2003 at 05:22PM PDT, ID: 20604290
[x]
Attachment Details

Database access from Microsoft Visual C

Asked by nicklilavois in C Programming Language, Microsoft Visual C++

Tags: cannot, include, file

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,"LoadLibrary Failed.","Cannot load Library msado15.dll.", MB_OK|MB_ICONINFORMATION);
  else
  {
    MessageBox(NULL,"LoadLibrary 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
[+][-]05.03.2003 at 01:30AM PDT, ID: 8449432

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.03.2003 at 08:39AM PDT, ID: 8450187

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.03.2003 at 10:41AM PDT, ID: 8450650

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.03.2003 at 12:56PM PDT, ID: 8451147

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.03.2003 at 10:42PM PDT, ID: 8453368

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.03.2003 at 11:53PM PDT, ID: 8453634

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: C Programming Language, Microsoft Visual C++
Tags: cannot, include, file
Sign Up Now!
Solution Provided By: fridom
Participating Experts: 3
Solution Grade: B
 
 
[+][-]05.04.2003 at 08:17AM PDT, ID: 8455408

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32