Results 1 to 6 of 6

Thread: !RESOLVED! Types and Arrays

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jul 2002
    Location
    California
    Posts
    77

    !RESOLVED! Types and Arrays

    What I'm working with...

    Public Type CCC_RULE_CONDITIONS
    Text As String
    ID As Long
    Recurrance As Long
    SQLUpdated As Date
    End Type

    Public Type MONITORED_TICKETS
    Ticket_Number As Long
    MsgCount As Long
    MsgDate As Date
    CheckDate As Date
    Excluded As Boolean
    End Type

    Public Type CCC_RULES
    SelectFrom As String
    ID As Long
    Association As Long
    Type As Long
    SQLUpdated As Date
    LastRun As Date
    Exclusive As Boolean
    RecurranceLimit As Long
    Tags() As String
    TagCount As Long
    Condition() As CCC_RULE_CONDITIONS
    ConditionCount As Long
    CurrentTicket() As MONITORED_TICKETS
    TicketCount As Long
    End Type
    Public ccc_Rule() As CCC_RULES

    Public Type CCC_TIMER_SESSION
    EscalationClock As Date
    CurrentRule As Long
    RuleCount As Long
    End Type
    Public ccc_Timer As CCC_TIMER_SESSION

    In A Nut Shell...

    I'm getting the following error..."This array is fixed or temporarily locked". The first few times I debugged the program, I didn't get this error. Lately, each time I run the program, it seems that less and less is able to be stored.

    If more explaination is necessary, I'll certainly give it a go.

    Thank you.

    Oh yeah. attached is a file that is an example of what the running type is used for.
    Attached Images Attached Images  
    Last edited by Virgil J. Schmidt; Feb 27th, 2003 at 02:52 PM.

  2. #2
    PowerPoster
    Join Date
    Aug 2001
    Location
    new jersey
    Posts
    2,904
    don't know that this is your problem, but it is DEFINITELY a very bad idea to use reserved keywords as variable names

    Type As Long

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jul 2002
    Location
    California
    Posts
    77

    Duh!!!

    Your right...I'll change that asap...Thanx. I looked up some other threads that have similar issues, and have a couple ideas as to the problem. Looking it up on MSDN I think was a big clue...hehe...

    Thanx

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Jul 2002
    Location
    California
    Posts
    77

    update

    MSDN gives me info on 5.0. I'm using 6.0 (may not make a difference), but it reference a data grid. I have no datagrids in my form).

    Still looking for the answer if someone has any clue they can give me.

    Thanx

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Jul 2002
    Location
    California
    Posts
    77

    Okay er'yone

    I know I left a lot out on previous posts...so here's more (since I've done a little more research myself).

    I've made sure that all my references are ByVal. I've even cut out references specific to a call and made the variables available to the entire module (with the same results)...

    Once again, I'm redimming an array that is in a user-defined type. The attached image hopefully will help give a picture. With each ticket found, I redim a space for that ticketnumber (+). For what ever, if I include rule 6 in my timer checks, I cannot redim after two tickets, yet I am able to redim for great number of tickets on previous rules.

    ****If I skip those rules. It still cuts out on that on that specific array size (which is 3).

    ****If I hardcode 3 in there and still run rule 6 all by itself, code will redim until it tries it for the third time. So it will dim the array to three, but it won't do it on it's third try. Mind you, this is for rule 6.

    Note: The rules are sql statements. Once I get the information, I pass (once again ByVal) the data required. I don't reference over and over.

    I'm testing currently the exclusion of rule 6, but if that's it, I baffled.

    Thanx for listening (reading) the rambling. I will provide code upon request.

  6. #6

    Thread Starter
    Lively Member
    Join Date
    Jul 2002
    Location
    California
    Posts
    77
    I'm sure to all of you pro's this would have been obvious if I would have seen the code. This is the good version, but the bad code exited the WITH and didn't END WITH. So the array was locked. Simply simplistic.

    With ccc_Rule(ccc_Timer.CurrentRule).CurrentTicket(CID)
    If Not .MsgBar Then
    .CheckDate = ccc_Rule(ccc_Timer.CurrentRule).LastRun
    If DateDiff("n", .MsgDate, ccc_Rule(ccc_Timer.CurrentRule).LastRun) > RRecurrence Then
    .MsgCount = .MsgCount + 1
    .MsgDate = ccc_Rule(ccc_Timer.CurrentRule).LastRun
    Debug_Notification .Ticket_Number, ccc_Timer.CurrentRule, .MsgCount, RRecurrence
    ' Notify_Admin .Ticket_Number, .AssociatedRule, .MsgCount, Recurrance
    If .MsgCount = ccc_Rule(ccc_Timer.CurrentRule).RecurringLimit Then .MsgBar = True
    End If
    End If
    End With
    Return
    Last edited by Virgil J. Schmidt; Feb 27th, 2003 at 02:52 PM.

Posting Permissions

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



Click Here to Expand Forum to Full Width