asp.net+mysql5.0上传到服务器空间,出现startIndex 不能大于字符串长度。

来源:百度知道 编辑:UC知道 时间:2024/06/18 16:36:33
在本地调试可以正常运行,但上传到服务器空间后,就出现上面的错误。运行到数据添充时出错。da.Fill(ds);

“/”应用程序中的服务器错误。

startIndex 不能大于字符串长度。
参数名: startIndex
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。

异常详细信息: System.ArgumentOutOfRangeException: startIndex 不能大于字符串长度。
参数名: startIndex

源错误:

行 1248:
行 1249: conn.Open();
行 1250: da.Fill(ds);
行 1251: conn.Close();
行 1252:

源文件: d:\wwwroot\yuanfang513855\wwwroot\App_Code\WebShoppingDBO.cs 行: 1250

堆栈跟踪:

[ArgumentOutOfRangeException: startIndex 不能大于字符串长度。
参数名: startIndex]
System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy) +2819819
MySql.Data.MySqlClient.ISSchemaProvider.ParseProcedureBody(DataTable parametersTable, String body, DataRow row, String nameToRestrict) +406
MySql.Data.MySqlClient.ISSchemaProvider.GetParametersFromShowCrea

ArgumentOutOfRangeException: startIndex 不能大于字符串长度。
参数名: startIndex]
System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy) +2819819
MySql.Data.MySqlClient.ISSchemaProvider.ParseProcedureBody(DataTable parametersTable, String body, DataRow row, String nameToRestrict) +406
MySql.Data.MySqlClient.ISSchemaProvider.GetParametersFromShowCreate(DataTable parametersTable, String[] restrictions, DataTable routines) +418
MySql.Data.MySqlClient.ISSchemaProvider.GetProcedureParameters(String[] restrictions, DataTable routines) +502
MySql.Data.MySqlClient.ProcedureCache.GetProcData(MySqlConnection connection, String spName) +227
MySql.Data.MySqlClient.ProcedureCache.AddNew(MySqlConnection connection, String spName) +35
MySql.Data.MySqlClient.ProcedureCache.GetProcedure(MySqlConnection conn, String spName) +104
MySql.Data.MySqlClient.StoredProcedure.GetParameters(String procName) +98
MySql.Data.MyS