Redim Type Mis-match

Results 1 to 2 of 2

Thread: Redim Type Mis-match

  1. #1
    Sid Guest

    Default Redim Type Mis-match

    I have a problem with the code below, the error is:<BR><BR>Microsoft VBScript runtime error &#039 800a000d&#039 <BR><BR>Type mismatch <BR><BR>/transferinitiation.asp, line 232 <BR><BR>That is this line of code:<BR><BR> Redim Preserve currNames(count + 1)<BR><BR>This is where it fits in:<BR>...<BR>Do Until dsCurrency.EOF<BR> Dim count<BR> Dim currNames<BR> Dim currIds<BR> <BR> count = 0<BR><BR> if (Ccy &#062; 0 and dsCurrency.Fields("CurrencyNo") = Ccy) or (Ccy = 0 and dsCurrency.Fields("Code") = DefaultCcy) then<BR><BR> Redim Preserve currNames(count + 1)<BR> Redim Preserve currIds(count + 1)<BR><BR> currNames(count) = dsCurrency.Fields("Code")<BR> currIds(count) = dsCurrency.Fields("CurrencyNo")<BR> count = count + 1<BR><BR> if Ccy = 0 then<BR> Ccy = dsCurrency.Fields("CurrencyNo")<BR> end if<BR>...<BR><BR>Any ideas why this is not working?

  2. #2
    Join Date
    Dec 1969

    Default RE: Redim Type Mis-match

    You need to Dim the variable as an array first:<BR><BR>Dim currNames()<BR><BR>Dunc

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts