VS2010: Fatal error C1902: Program database manager mismatch; please check your installation

今天在使用VS2010编译程序时突然遇到这个错误,经过百度很久,才解决。

从网上查了资料,应该是mspdb100.dllmspdbsrv.exe找不到了,或者不匹配造成的,

直接将文件从C:/Program Files/Microsoft Visual Studio 10/Common7/IDE 中的mspdb100.dll 和mspdbsrv.exe拷贝到C:/Program Files/Microsoft Visual Studio 10/VC/bin. 但是还是出现fatal error C1902.

后来参照http://vanlee820816.blog.163.com/blog/static/1798135120085524551139/这篇文章,copy了msobj100.dll,mspdb100.dll和mspdbcore.dll三个dll,结束VS编译器和mspdbsrv.exe,重新打开编译器编译,程序正常了。


参考文章:

 http://vanlee820816.blog.163.com/blog/static/1798135120085524551139/



 

展开阅读全文

You have an error in your SQL syntax; check the manual that corresponds to your

08-07

原语句:rndatas = electricitycharge.daorn .paginate(rn pageNumber,rn pageSize,rn "select * ",rn "from electricitycharge left join room r where r.roomid in (select roomid from room where campus like ? and buildnumber like ? and roomnumber like ? and gzh like ? order by campus asc ,buildnumber asc,roomnumber asc )",rn campus, buildnumber, roomnumber, gzh);rnrn报错:Sql: select count(*) from electricitycharge left join room r where r.roomid in (select roomid from room where campus like ? and buildnumber like ? and roomnumber like ? and gzh like ? order by campus asc ,buildnumber asc,roomnumber asc )rn2014-8-7 15:14:40 com.jfinal.core.ActionHandler errorrn严重: /echarge/echargeList?_=1407395679877rncom.jfinal.plugin.activerecord.ActiveRecordException: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'where r.roomid in (select roomid from room where campus like '%' and buildnumber' at line 1rn at com.jfinal.plugin.activerecord.Model.paginate(Model.java:235)rn at cn.jxust.controller.base.EChargeController.echargeList(EChargeController.java:64)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:597)rn at com.jfinal.core.ActionInvocation.invoke(ActionInvocation.java:55)rn at cn.jxust.interceptor.ManagerPowerInterceptor.intercept(ManagerPowerInterceptor.java:44)rn at com.jfinal.core.ActionInvocation.invoke(ActionInvocation.java:51)rn at com.jfinal.core.ActionHandler.handle(ActionHandler.java:73)rn at com.jfinal.core.JFinalFilter.doFilter(JFinalFilter.java:72)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)rn at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)rn at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)rn at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)rn at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)rn at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1822)rn at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)rn at java.lang.Thread.run(Thread.java:619)rnCaused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'where r.roomid in (select roomid from room where campus like '%' and buildnumber' at line 1rn at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)rn at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)rn at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)rn at java.lang.reflect.Constructor.newInstance(Constructor.java:513)rn at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)rn at com.mysql.jdbc.Util.getInstance(Util.java:386)rn at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1052)rn at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4096)rn at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4028)rn at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2490)rn at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2651)rn at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2683)rn at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2144)rn at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2310)rn at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_executeQuery(FilterChainImpl.java:2708)rn at com.alibaba.druid.filter.FilterEventAdapter.preparedStatement_executeQuery(FilterEventAdapter.java:465)rn at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_executeQuery(FilterChainImpl.java:2705)rn at com.alibaba.druid.proxy.jdbc.PreparedStatementProxyImpl.executeQuery(PreparedStatementProxyImpl.java:99)rn at com.alibaba.druid.pool.DruidPooledPreparedStatement.executeQuery(DruidPooledPreparedStatement.java:182)rn at com.jfinal.plugin.activerecord.Db.query(Db.java:46)rn at com.jfinal.plugin.activerecord.Model.paginate(Model.java:215)rn ... 26 more 论坛

fatal error C1189: #error : "Compiler not supported or configured - please rec

02-23

// See http://www.boost.org for most recent version.rn//rn// Microsoft Visual C++ compiler setup:rn//rn// We need to be careful with the checks in this file, as contraryrn// to popular belief there are versions with _MSC_VER with the finalrn// digit non-zero (mainly the MIPS cross compiler).rn//rn// So we either test _MSC_VER >= XXXX or else _MSC_VER < XXXX.rn// No other comparisons (==, >, or <=) are safe.rn//rnrn#define BOOST_MSVC _MSC_VERrnrn//rn// Helper macro BOOST_MSVC_FULL_VER for use in Boost code:rn//rn#if _MSC_FULL_VER > 100000000rn# define BOOST_MSVC_FULL_VER _MSC_FULL_VERrn#elsern# define BOOST_MSVC_FULL_VER (_MSC_FULL_VER * 10)rn#endifrnrn// Attempt to suppress VC6 warnings about the length of decorated names (obsolete):rn#pragma warning( disable : 4503 ) // warning: decorated name length exceededrnrn#define BOOST_HAS_PRAGMA_ONCErnrn//rn// versions check:rn// we don't support Visual C++ prior to version 7.1:rn#if _MSC_VER < 1310rn[color=#FF0000]# error "Compiler not supported or configured - please reconfigure"[/color]rn#endifrnrn#if _MSC_FULL_VER < 180020827rn# define BOOST_NO_FENV_Hrn#endifrnrn#if _MSC_VER < 1400rn// although a conforming signature for swprint exists in VC7.1rn// it appears not to actually work:rn# define BOOST_NO_SWPRINTFrn// Our extern template tests also fail for this compiler:rn# define BOOST_NO_CXX11_EXTERN_TEMPLATErn// Variadic macros do not exist for VC7.1 and lowerrn# define BOOST_NO_CXX11_VARIADIC_MACROSrn#endifrnrn#if defined(UNDER_CE)rn// Windows CE does not have a conforming signature for swprintfrn# define BOOST_NO_SWPRINTFrn#endifrnrn#if _MSC_VER < 1500 // 140X == VC++ 8.0rn# define BOOST_NO_MEMBER_TEMPLATE_FRIENDSrn#endifrnrn#if _MSC_VER < 1600 // 150X == VC++ 9.0rn // A bug in VC9:rn# define BOOST_NO_ADL_BARRIERrn#endifrnrnrn// MSVC (including the latest checked version) has not yet completelyrn// implemented value-initialization, as is reported:rn// "VC++ does not value-initialize members of derived classes withoutrn// user-declared constructor", reported in 2009 by Sylvester Hesp:rn// https://connect.microsoft.com/VisualStudio/feedback/details/484295rn// "Presence of copy constructor breaks member class initialization",rn// reported in 2009 by Alex Vakulenko:rn// https://connect.microsoft.com/VisualStudio/feedback/details/499606rn// "Value-initialization in new-expression", reported in 2005 byrn// Pavel Kuznetsov (MetaCommunications Engineering):rn// https://connect.microsoft.com/VisualStudio/feedback/details/100744rn// See also: http://www.boost.org/libs/utility/value_init.htm#compiler_issuesrn// (Niels Dekker, LKEB, May 2010)rn# define BOOST_NO_COMPLETE_VALUE_INITIALIZATIONrnrn#ifndef _NATIVE_WCHAR_T_DEFINEDrn# define BOOST_NO_INTRINSIC_WCHAR_Trn#endifrnrn#if defined(_WIN32_WCE) || defined(UNDER_CE)rn# define BOOST_NO_SWPRINTFrn#endifrnrn// we have ThreadEx or GetSystemTimeAsFileTime unless we're running WindowsCErn#if !defined(_WIN32_WCE) && !defined(UNDER_CE)rn# define BOOST_HAS_THREADEXrn# define BOOST_HAS_GETSYSTEMTIMEASFILETIMErn#endifrnrn//rn// check for exception handling support:rn#if !defined(_CPPUNWIND) && !defined(BOOST_NO_EXCEPTIONS)rn# define BOOST_NO_EXCEPTIONSrn#endifrnrn//rn// __int64 support:rn//rn#define BOOST_HAS_MS_INT64rn#if defined(_MSC_EXTENSIONS) || (_MSC_VER >= 1400)rn# define BOOST_HAS_LONG_LONGrn#elsern# define BOOST_NO_LONG_LONGrn#endifrn#if (_MSC_VER >= 1400) && !defined(_DEBUG)rn# define BOOST_HAS_NRVOrn#endifrn//rn// disable Win32 API's if compiler extentions arern// turned off:rn//rn#if !defined(_MSC_EXTENSIONS) && !defined(BOOST_DISABLE_WIN32)rn# define BOOST_DISABLE_WIN32rn#endifrn#if !defined(_CPPRTTI) && !defined(BOOST_NO_RTTI)rn# define BOOST_NO_RTTIrn#endifrnrn//rn// TR1 features:rn//rn#if _MSC_VER >= 1700rn// # define BOOST_HAS_TR1_HASH // don't know if this is true yet.rn// # define BOOST_HAS_TR1_TYPE_TRAITS // don't know if this is true yet.rn# define BOOST_HAS_TR1_UNORDERED_MAPrn# define BOOST_HAS_TR1_UNORDERED_SETrn#endifrnrn//rn// C++0x featuresrn//rn// See above for BOOST_NO_LONG_LONGrnrn// C++ features supported by VC++ 10 (aka 2010)rn//rn#if _MSC_VER < 1600rn# define BOOST_NO_CXX11_AUTO_DECLARATIONSrn# define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONSrn# define BOOST_NO_CXX11_LAMBDASrn# define BOOST_NO_CXX11_RVALUE_REFERENCESrn# define BOOST_NO_CXX11_STATIC_ASSERTrn# define BOOST_NO_CXX11_NULLPTRrn# define BOOST_NO_CXX11_DECLTYPErn#endif // _MSC_VER < 1600rnrn#if _MSC_VER >= 1600rn# define BOOST_HAS_STDINT_Hrn#endifrnrn// C++11 features supported by VC++ 11 (aka 2012)rn//rn#if _MSC_VER < 1700rn# define BOOST_NO_CXX11_RANGE_BASED_FORrn# define BOOST_NO_CXX11_SCOPED_ENUMSrn#endif // _MSC_VER < 1700rnrn// C++11 features supported by VC++ 12 (aka 2013).rn//rn#if _MSC_FULL_VER < 180020827rn# define BOOST_NO_CXX11_DEFAULTED_FUNCTIONSrn# define BOOST_NO_CXX11_DELETED_FUNCTIONSrn# define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORSrn# define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGSrn# define BOOST_NO_CXX11_RAW_LITERALSrn# define BOOST_NO_CXX11_TEMPLATE_ALIASESrn# define BOOST_NO_CXX11_TRAILING_RESULT_TYPESrn# define BOOST_NO_CXX11_VARIADIC_TEMPLATESrn# define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAXrn#endifrnrn// C++11 features not supported by any versionsrn#define BOOST_NO_CXX11_CHAR16_Trn#define BOOST_NO_CXX11_CHAR32_Trn#define BOOST_NO_CXX11_CONSTEXPRrn#define BOOST_NO_CXX11_DECLTYPE_N3276rn#define BOOST_NO_CXX11_NOEXCEPTrn#define BOOST_NO_CXX11_UNICODE_LITERALSrn#define BOOST_NO_SFINAE_EXPRrn#define BOOST_NO_TWO_PHASE_NAME_LOOKUPrn#define BOOST_NO_CXX11_USER_DEFINED_LITERALSrn#define BOOST_NO_CXX11_ALIGNASrn#define BOOST_NO_CXX11_INLINE_NAMESPACESrnrn//rn// prefix and suffix headers:rn//rn#ifndef BOOST_ABI_PREFIXrn# define BOOST_ABI_PREFIX "boost/config/abi/msvc_prefix.hpp"rn#endifrn#ifndef BOOST_ABI_SUFFIXrn# define BOOST_ABI_SUFFIX "boost/config/abi/msvc_suffix.hpp"rn#endifrnrn#ifndef BOOST_COMPILERrn// TODO:rn// these things are mostly bogus. 1200 means version 12.0 of the compiler. Thern// artificial versions assigned to them only refer to the versions of some IDErn// these compilers have been shipped with, and even that is not all of it. Somern// were shipped with freely downloadable SDKs, others as crosscompilers in eVC.rn// IOW, you can't use these 'versions' in any sensible way. Sorry.rn# if defined(UNDER_CE)rn# if _MSC_VER < 1400rn // Note: I'm not aware of any CE compiler with version 13xxrn# if defined(BOOST_ASSERT_CONFIG)rn# error "Unknown EVC++ compiler version - please run the configure tests and report the results"rn# elsern# pragma message("Unknown EVC++ compiler version - please run the configure tests and report the results")rn# endifrn# elif _MSC_VER < 1500rn# define BOOST_COMPILER_VERSION evc8rn# elif _MSC_VER < 1600rn# define BOOST_COMPILER_VERSION evc9rn# elif _MSC_VER < 1700rn# define BOOST_COMPILER_VERSION evc10rn# elif _MSC_VER < 1800 rn# define BOOST_COMPILER_VERSION evc11 rn# elif _MSC_VER < 1900 rn# define BOOST_COMPILER_VERSION evc12rn# elsern# if defined(BOOST_ASSERT_CONFIG)rn# error "Unknown EVC++ compiler version - please run the configure tests and report the results"rn# elsern# pragma message("Unknown EVC++ compiler version - please run the configure tests and report the results")rn# endifrn# endifrn# elsern# if _MSC_VER < 1310rn // Note: Versions up to 7.0 aren't supported.rn# define BOOST_COMPILER_VERSION 5.0rn# elif _MSC_VER < 1300rn# define BOOST_COMPILER_VERSION 6.0rn# elif _MSC_VER < 1310rn# define BOOST_COMPILER_VERSION 7.0rn# elif _MSC_VER < 1400rn# define BOOST_COMPILER_VERSION 7.1rn# elif _MSC_VER < 1500rn# define BOOST_COMPILER_VERSION 8.0rn# elif _MSC_VER < 1600rn# define BOOST_COMPILER_VERSION 9.0rn# elif _MSC_VER < 1700rn# define BOOST_COMPILER_VERSION 10.0rn# elif _MSC_VER < 1800 rn# define BOOST_COMPILER_VERSION 11.0rn# elif _MSC_VER < 1900rn# define BOOST_COMPILER_VERSION 12.0rn# elsern# define BOOST_COMPILER_VERSION _MSC_VERrn# endifrn# endifrnrn# define BOOST_COMPILER "Microsoft Visual C++ version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION)rn#endifrnrn//rn// last known and checked version is 18.00.20827.3 (VC12 RC, aka 2013 RC):rn#if (_MSC_VER > 1800 && _MSC_FULL_VER > 180020827)rn# if defined(BOOST_ASSERT_CONFIG)rn# error "Unknown compiler version - please run the configure tests and report the results"rn# elsern# pragma message("Unknown compiler version - please run the configure tests and report the results")rn# endifrn#endifrn请教高位高手,代码中红色部分出错,错误信息directx9.0sdk\include\boost\config\compiler\visualc.hpp(43) : fatal error C1189: #error : "Compiler not supported or configured - please reconfigure"如何解决 论坛

vs2010 fatal error C1083: 如何解决?

05-05

本人的开发环境是 vs2010,在做驱动开发,请各位帮忙看下,下面的报错该如何解决:rnrnrn1>------ 已启动全部重新生成: 项目: imageprinter3, 配置: Debug Win32 ------rn1>生成启动时间为 2014-5-5 17:04:19。rn1>_PrepareForClean:rn1> 正在删除文件“Debug\imageprinter3.lastbuildstate”。rn1>InitializeBuildStatus:rn1> 正在对“Debug\imageprinter3.unsuccessfulbuild”执行 Touch 任务。rn1>ClCompile:rn1> utils.cpprn1> tiffcp.cpprn1>e:\driverprogram\imageprinter3\imageprinter3\tiffcp.h(10): fatal error C1083: 无法打开包括文件:“getopt.h”: No such file or directoryrn1> stdafx.cpprn1> PortList.cpprn1>e:\driverprogram\imageprinter3\imageprinter3\PortList.h(3): fatal error C1083: 无法打开包括文件:“string”: No such file or directoryrn1> p2png.cpprn1>e:\driverprogram\imageprinter3\imageprinter3\png\zlib.h(34): fatal error C1083: 无法打开包括文件:“zconf.h”: No such file or directoryrn1> p2jpg.cpprn1>e:\driverprogram\imageprinter3\imageprinter3\p2jpg.h(15): fatal error C1083: 无法打开包括文件:“string”: No such file or directoryrn1> Monitor.cpprn1>e:\driverprogram\imageprinter3\imageprinter3\PortList.h(3): fatal error C1083: 无法打开包括文件:“string”: No such file or directoryrn1> imageprinter3.cpprn1> 正在生成代码...rn1>rn1>生成失败。rn1>rn1>已用时间 00:00:05.28rn========== 全部重新生成: 成功 0 个,失败 1 个,跳过 0 个 ==========rnrnrnrn谢谢各位! 论坛

fatal error

04-01

[code=C/C++]rn#include rn#includernusing namespace std;rnrnconst char map[] = 2, 2, 2, 3, 3, 3, 4, 4, 4,rn 5, 5, 5, 6, 6, 6, 7, 0, 7,rn 7, 8, 8, 8, 9, 9, 9;rnrntypedef char (*Tel)[16];rnrnint Deal(Tel telephone, Tel result, int count[], int nCases);rnvoid Output(Tel result, int count[], int nCount);rnrnint main()rnrn int nCases;rn int index = 0;rn cin >> nCases;rn Tel telephone = new char[nCases][16];rn Tel result = new char[nCases][16];rn int *count = new int[nCases];rnrn char temp[16];rn while (index < nCases)rn rn cin >> temp;rn strcmp(telephone[index++], temp);rn rnrn int nCount = Deal(telephone, result, count, nCases);rn Output(result, count, nCount);rnrn delete []count;rn delete []telephone;rn delete []result;rn return 0;rnrnrnint Deal(Tel telephone, Tel result, int count[], int nCases)rnrn char temp[16];rn int nCount = 0;rn temp[8] = '\0';rn for (int i = 0; i < nCases; i++)rn count[i] = 0;rnrn for (int i = 0; i < nCases; i++)rn rn int len = strlen(telephone[i]);rn int k = 0;rn int j;rn for (j = 0; j < len; j++)rn rn if (telephone[i][j] != '-')rn temp[k++] = map[telephone[i][j]-'A'];rn if (k == 3)rn temp[k++] = '-';rn rnrn for (j = 0; j < nCount; j++)rn if (strcmp(temp, result[j]) == 0)rn rn count[j]++;rn break;rn rnrn if (j == nCount) rn strcpy(result[nCount++], temp);rn count[nCount-1]++;rn rn rnrn return nCount;rnrnrnvoid output(Tel result, int count[], int nCount)rnrn for (int i = 0; i < nCount; i++)rn cout << result[i] << " " << count[i] << endl;rnrn[/code]rnrn1>1001.obj : error LNK2019: 无法解析的外部符号 "void __cdecl Output(char (*)[16],int * const,int)" (?Output@@YAXPAY0BA@DQAHH@Z),该符号在函数 _main 中被引用rnrn用的是vs2010~~~ 论坛

Database ERROR: No Database Selected ??

03-27

rnrn Delete from Staff where StaffNo = "?" rnrnrn Rows in Staff table rnrn rn rn rn staffNOrn staffNamern comissionrn position rn branchNOrn monthrn numberOftasks rnrn\n";rn while ($line = mysql_fetch_array($mysql_result, MYSQL_ASSOC)) rn rn foreach ($line as $col_value) rn print "$col_value";rn rn print "\n";rn rn print "\n";rnrn rn mysql_free_result($mysql_result); rn mysql_close($mysql_link);rnrn if($_SERVER['REQUEST_METHOD'] == "POST") rn rn $StaffNo = addslashes($_POST["StaffNo"]);rn rn $sql = " DELETE FROM Staff ";rn $sql .= " WHERE StaffNo = '$StaffNo' ";rn rn $result = mysql_query($sql);rnrn if (mysql_error())rn rn print "Database ERROR: " . mysql_error();rn rn elsern rnrn $query="select * from staff";rn $mysql_result = mysql_query ($query);rn rn if ( mysql_num_rows ($mysql_result)>0)rn rn print " ";rn print " ";rn print " ";rn print " StaffNo";rn print " StaffName";rn print " StaffContact";rn print " StaffSalary";rn print " StaffCommission";rn print " Month";rn print " NumberOfSalesAndRentals";rn print " BranchNo"; rn print "";rn print "";rn rn while ($line = mysql_fetch_array($mysql_result, MYSQL_ASSOC)) rn rn foreach ($line as $col_value) rn print "$col_value";rn rn print "\n";rn rn print "\n";rnrn rn mysql_free_result($mysql_result); rnrn rn mysql_close($mysql_link);rn rn print " Row deleted from Staff table.\n";rn rn rnrn?>rnrn rnStaff No: rn rn rnrnrnrnrn运行http://localhost/test1.php后,显示Database ERROR: No Database Selected ,为什么?? 论坛

没有更多推荐了,返回首页