-
ReDim Error
About two weeks ago, my users started reporting a "Redim" error on various reports on our site. I called Mark, and was told to upgrade to the latest DLL.
Now I've got the latest DLL on our production server, and I've switched out every .dbDBType to be a custom declaration and my users are still reporting this "Redim" error. It is random, and does not always happen. Here is an example error code:
'ReDim' can only change the rightmost dimension.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArrayTypeMismatchException: 'ReDim' can only change the rightmost dimension.
Source Error:
Line 77: .dbGridHideFlds = "PRICING_EXCEPTION_TLG"
Line 78: .dbExportCols= "2,(5)"
Line 79: .ASPdbNET()
Line 80: End With
Line 81: Response.Write("</td></tr>")
Source File: F:\InetPub\wwwroot\salesData\fundings-ae.aspx Line: 79
Stack Trace:
[ArrayTypeMismatchException: 'ReDim' can only change the rightmost dimension.]
Microsoft.VisualBasic.CompilerServices.Utils.CopyA rray(Array arySrc, Array aryDest) +508
Tornado.Export.0(String p) +4291
Tornado.RS_ODBC.0(String p, String p, String p) +11919
Tornado.RS.0(String p) +298
Tornado.Z.ASPdbNET(String MainOpt) +1261
ASP.fundings_ae_aspx.Page_Load(Object Source, EventArgs E) in F:\InetPub\wwwroot\salesData\fundings-ae.aspx:79
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573
I’ve been thinking about this for a while, and I believe the error may associated with .dbExportCols. Logically, it’s the only place I know of that I am using an array, so it might be the cause of the failure, but I’ve run the same reports my users claim to have run, and cannot reproduce the error 100% of the time.
The question of “Why is it only happening recently?” is probably answered only by a change in our data, but I do not have access to the Tornado code, and cannot verify or add error handling to .dbExportColds. Is it possible for you to send me the .dbExportCols code, or otherwise verify that it does have error handling (i.e. it checks for NULLs, and casts mis-typed data when possible, and drops mis-typed data that cannot be cast?)
My users have been plagued with errors stemming from this, and the .dbDBType issue for nearly two weeks now. Any help resolving this in a timely manner would be appreciated.
-
Let's approach in a logical manner. The following code exports both rows and columns and it uses NWIND. Run that and see what happens -
<script language="vb" runat="server">
Sub Page_Load(Source as Object, E as EventArgs)
Dim GD As New Tornado.Getdata()
Dim Export As New Tornado.Z()
With Export
.dbUnit = 13
.dbSkin=13
.dbMode = "ty=dual-horiz|sysindex=true"
.dbGridDisplayFlds = "0,1,2,3,4,5"
.dbPageSize = 10
.dbDSN = "Nwind"
.dbSQL = "Select * From products"
.dbGridMagicCell = "field=0|macro=My ID is - #0#"
.dbExportFlds = "(0),1,2,3"
.dbExportCols = "4,(5)"
.dbTextHolder="Title=Tornado Demo - Export Rows and Columns"
.ASPdbNET()
End With
'------ User Code to process Exported data --------
Response.Write("<Center><P><table class=ts cellspacing='1'><tr><td class=gh COLSPAN=4>Export Fields 0, 1, 2 & 3 (Row)</td><tr>")
Dim c As Integer
Dim r As Long
Dim arr() As String = GD.Get_Fexport
For c = 0 To UBound(arr)
Response.Write("<td class=nr align=center>" & arr(c) & "</td>")
Next c
Response.Write("</tr></table>")
Response.Write("<Center><P><table class=ts cellspacing='1'><tr><td class=gh COLSPAN=2>Export Columns 4 and 5</td>")
Dim Carr(,) As String = GD.Get_Cexport
For r = 0 To UBound(Carr, 2)
Response.Write("<tr>")
For c = 0 To UBound(Carr, 1)
Response.Write("<td class=nr align=center>" & Carr(c,r) & "</td>")
Next c
Response.Write("</tr>")
Next r
Response.Write("</table></center>")
End Sub
</script>
Frank
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|