Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2003
    Location
    Pune, India
    Posts
    5

    Question Unanswered: Listview (MSCOMCTL.OCX) problem

    I am using the list view control (mscomctl.ocx) in my application. While populating the items in the listview (lvResCat) I am setting the keys of the items as "R" and then suffixing the ID of the record fetched from the database table. See the code below: Table has fields: ID, Code, Description

    lIndex = 1
    Do While Not rsData.EOF
    sTemp = "R" & rsData!id
    lvResCat.ListItems.Add lIndex, sTemp, Trim(rsData!code)
    rsData.MoveNext
    lIndex = lIndex + 1
    Loop

    I know the code is fine and infact it works on all machines. But to my surprise it gave errors on some machines (laptops) with XP and windows 2003 server. I have tried every possible combinations like settng the keys differently etc. The version of the mscomctl.ocx used is 6.1.97.86 and is the same on these machines too.

    Can anybody suggest what can be the problem.

  2. #2
    Join Date
    Jun 2004
    Location
    Arizona, USA
    Posts
    1,848
    How are you distributing the apps?

    As just the exe file, or packaged using an installer?
    Lou
    使大吃一惊
    "Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
    "I have my standards. They may be low, but I have them!" - Bette Middler
    "It's a book about a Spanish guy named Manual. You should read it." - Dilbert


  3. #3
    Join Date
    Nov 2003
    Location
    Pune, India
    Posts
    5
    Anyway...the error comes using the exe as well as using the installer. I found another interesting thing yesterday that the error (sometimes, not always) actually gets generated after populating one item in the list. If we use the key as a complete varchar then it works fine. The key is not acepting any numbers in it.

Posting Permissions

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