⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 subject_38605.htm

📁 一些关于vc的问答
💻 HTM
字号:
<p>
序号:38605 发表者:sunhao 发表日期:2003-05-04 22:02:59
<br>主题:亲人们呀!可找到你们了!ADO SQL快进来吧
<br>内容:诸位豪杰:我刚学VC++数据库编程,遇到一个大问题。如下:用ADO技术,声明_ConnectionPtr MyConn和<BR><BR>_RecordsetPtr MyRecset变量,可是一编译,出现报错:<BR>1。“syntax error : missing ';' before identifier 'MyRecset'”<BR>2。“'_RecordsetPtr' : missing storage-class or type specifiers”<BR>3。“'MyRecset' : missing storage-class or type specifiers<BR>4。“syntax error : identifier '_RecordsetPtr'”<BR>5。syntax error : missing ';' before identifier 'MyConn'<BR>&nbsp;&nbsp; '_ConnectionPtr' : missing storage-class or type specifiers<BR>&nbsp;&nbsp; 'MyConn' : missing storage-class or type specifiers<BR>&nbsp;&nbsp; 'MyConn' : undeclared identifier<BR>6。'Connection' : undeclared identifier<BR>7。'MyRecset' : undeclared identifier<BR><BR>&nbsp;&nbsp; 'Recordset' : undeclared identifier<BR>&nbsp;&nbsp; '_RecordsetPtr' : undeclared identifier<BR>&nbsp;&nbsp; 'MyRecset' : undeclared identifier<BR><BR>等等。<BR>我已经在stdafx.h 中加入代码#import "D:\program files\common files\system\ado\msado15.dll" <BR>no_namespace \<BR>rename("EOF","EndOfFile") \<BR><BR>还有,我发现在选中_ConnectionPtr和_RecordsetPtr之后,鼠标右键选择“Go to Definition of _ConnectionPtr”和“Go to Reference of _ConnectionPtr”,程序弹出对话框“symbol of ‘_ConnectionPtr’is undefined”。而书上的示范程序不是这样,而是打开msado15.tlh文件,我估计问题出在此。可是如何解决呢??谢谢大虾,谁能帮忙解决?<BR><BR>会不会是在建造工程时,在“what database support would you like to include”一步,没选择“Header <BR><BR>files only”? 如何弥补这个呢?<BR>
<br><a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p>
<hr size=1>
<blockquote><p>
回复者:晚风也渡 回复日期:2003-05-05 08:27:52
<br>内容:#import "D:\program files\commonfiles\system\ado\msado15.dll" no_namespace\<BR>rename("EOF","EndOfFile")\//你确认这个路径是对的,而且在stdafx.h中的位置对吗?应该加在括号外<BR><BR>
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:howsoon 回复日期:2003-05-05 12:14:37
<br>内容:路径没问题,位置也对。您说括号在外边?什么括号?我看了其他帖子,好像唯一的解决办法是重新建个工程,天!那我的界面就全白写了。
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
<font color=red>答案被接受</font><br>回复者:howsoon 回复日期:2003-05-05 17:12:24
<br>内容:谢谢“风渡”hehe。问题解决了,就是把DEBUG文件夹里的stdafx.sbr文件删除,然后重新编译整个工程一下就行乐。挺奇怪的。继续互通有无吧。
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -