Problem with ADO Connection 
Author Message
 Problem with ADO Connection

I am working on a vc project which requires linkage to SQL
DB with C++, I use the code sample as provided in MSDN
Library (ref URL =>
http://www.*-*-*.com/
url=/library/en-us/ado270/htm/mdproconnectionstringxvc.asp)

When building the program, following error encountered:
Code.cpp
d:\note\is4234\assignment 2\code\code.cpp(182) : fatal
error C1010: unexpected end of file while looking for
precompiled header directive
Error executing cl.exe.

Code.exe - 1 error(s), 0 warning(s)

Can anyone give me some hints to solve the problem??

Thanks a million



Wed, 06 Oct 2004 18:29:27 GMT  
 Problem with ADO Connection
Brian,

Your project setting are such that the compiler is expecting precompiled
headers, but your source file does not have the designated header include.
Here are the rules:
1) an stdafx.+cpp with Create PCH setting selected, and stdafx.h selected
2) an stdafx.h that has all of the includes for the pch
3) an entry of #include "stdafx.h" in every source file
4) each source file should have Use PCH setting selected, and stdafx.h
selected

If you want to get rid of precompiled headers, consider the following:
For EVERY source file that is compiled, in the
Project|Settings-Category|PreCompiled Headers msection, select the "Not
using precompiled headers" option...

This should get you past the compile/preprocessor error messages, but will
cause compiles to be a bit slower (and the performance degradation increases
sharply as you include more and more, and as the number of source files
increases.

best regards
Roy Fine


Quote:
> I am working on a vc project which requires linkage to SQL
> DB with C++, I use the code sample as provided in MSDN
> Library (ref URL =>
> http://msdn.microsoft.com/library/default.asp?
> url=/library/en-us/ado270/htm/mdproconnectionstringxvc.asp)

> When building the program, following error encountered:
> Code.cpp
> d:\note\is4234\assignment 2\code\code.cpp(182) : fatal
> error C1010: unexpected end of file while looking for
> precompiled header directive
> Error executing cl.exe.

> Code.exe - 1 error(s), 0 warning(s)

> Can anyone give me some hints to solve the problem??

> Thanks a million



Wed, 06 Oct 2004 23:48:19 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Problem with ADO Connection crashing program without raising exception !

2. Imlementing ADO.Connection interfaces VC++ problems

3. ATL / ADO problems while closing connection

4. COM / ADO - Problems while closing connection

5. ADO Connection Problem with V++

6. Problem in creating ADO connection instance in thread

7. ADO Connection problems

8. ADO connection problem

9. ADO connection problems

10. DSN less connection with ADO problem

11. ADO.NET Connection form in c#

12. accessing to an ADO DB connections from different forms

 

 
Powered by phpBB® Forum Software