Problem of #import "C:\Program Files\Common Files\System\ado\msado15.dll" \

Sep 29, 2011 at 6:27pm
I am new ADO. I was trying a tutorial related in ADO. Meanwhile, I encounter this problem.

Import code has red under line and when mouse was over it, representing "Error: cannot open source file "c:/Users/apark/documents/visual studio 2010/Project.../Debug/msado15.tlh"

Even, I couldn't find msado15.tlh in above local address. how can I fix this problem? please help me.

this is the code
#import "C:\Program Files\Common Files\System\ado\msado15.dll" \
rename("EOF", "EndOfFile")

typedef ADODB::_RecordsetPtr RecPtr;
typedef ADODB::_ConnectionPtr CnnPtr;

I used Visual studio 2010 and window 7 64bit
Sep 29, 2011 at 6:51pm
use "\\" instead of "\". Because "\x" means a special character. So "\P","\S","\C","\a","\m"... All represents a special char. But "\\" represents \ character.
Sep 29, 2011 at 7:16pm
#inport is a directive, like #include, so single backslashes are what you need. It's not a string.

.tlh is a header file created during the import process. It should have turned up in the debug or release folder, along with a .tli file and your .obj files, etc.

As you're using a 64 bit system, has the ADO dll turned up in "Program Files", or "Program Files (x86)" ???

Andy
Topic archived. No new replies allowed.