我将ASP.NET 4.5应用程序从Windows Server 2008移到了AWS实例Windows Server 2012 R2 Base。我能够得到所有设置,但应用程序现在错误在下面的代码。如果我注释掉下面的代码,那么在从数据库或Int32转换的另一次读取时会发生同样的错误:
lblQuote.Text = "'" + drQuotes["quote"].ToString() + "' (";
Stack Trace:OverflowException:算术运算导致 溢出。 System.Data.Odbc.OdbcDataReader.GetSqlType(Int32 i) +359 System.Data.Odbc.OdbcDataReader.GetValue(Int32 i)+57 path.DisplayQuote()in C:\的Inetpub \ wwwroot的\ dreamplaybook \ path.aspx.cs:764
path.Page_Load(Object sender,EventArgs e)in C:\的Inetpub \ wwwroot的\ dreamplaybook \ path.aspx.cs:180
System.Web.UI.Control.LoadRecursive()+71
System.Web.UI.Page.ProcessRequestMain(布尔 includeStagesBeforeAsyncPoint,Boolean includeStagesAfterAsyncPoint) +3178版本信息:Microsoft .NET Framework版本:4.0.30319; ASP.NET版本:4.0.30319.34248
在AWS Windows 2012中设置我的新MySQL实例后,我通过从以前的MySQL Windows 2008实例运行我的sqldump代码来重新创建数据库。下面是创建表格的示例代码,其中drQuotes将读取访问权限。
--
-- Table structure for table `dpsurvey_quote`
--
DROP TABLE IF EXISTS `dpsurvey_quote`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `dpsurvey_quote` (
`quoteID` int(10) unsigned NOT NULL AUTO_INCREMENT,
`qCategoryID` int(10) unsigned NOT NULL,
`careerID` int(10) unsigned DEFAULT NULL,
`author` varchar(50) NOT NULL,
`quote` text NOT NULL,
PRIMARY KEY (`quoteID`),
KEY `qCategoryID` (`qCategoryID`),
KEY `fk_dpsurvey_quote_careerID` (`careerID`),
CONSTRAINT `dpsurvey_quote_ibfk_1` FOREIGN KEY (`qCategoryID`) REFERENCES `dpsurvey_qcategory` (`qCategoryID`),
CONSTRAINT `fk_dpsurvey_quote_careerID` FOREIGN KEY (`careerID`) REFERENCES `dpsurvey_career` (`careerID`)
) ENGINE=InnoDB AUTO_INCREMENT=45 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
到目前为止,我尝试过的事情还没有成功:
非常感谢你的帮助!我已经被困在这几天了。