Results 1 to 5 of 5

Thread: Big Problems

  1. #1
    Join Date
    Jan 2003
    Location
    Langley, British Columbia, Canada
    Posts
    13

    Talking Unanswered: Big Problems

    I've come across an issue which i believe is related to Windows 2003 populating database elements, notably date/time types, and having those fields read on another platform (eg. winXP, win98) and, although everything would seem to match, comparissons fail.

    For example, if i populate a datetime field with the value 22:22 (eg. 10:22 pm) from a Windows 2003 pc, then read the value of the field on another pc (eg. WinXP), and perform a comparisson in code (vb6sp5), the values are not equal.

    I have observed this against Access database using DAO 2.5, 3.51 and 3.6 on both sides. Also observed against SQL Server 2000.

    All i can figure is that windows 2003 is causing the problem, but i don't know how to resolve it.

    I understand this is not a forum for operating system questions, but my intent would be to generate a routine which would correctly populate the database elements on the win2003 side, for proper execution on the other pcs in use.

    Any help would be greatly appreciated.
    Jeff Jonsson

  2. #2
    Join Date
    Jul 2003
    Location
    San Antonio, TX
    Posts
    3,662
    Do you perform your comparison in code or visually? I had to use my 2003 with client tools against 2K SQL Server and had no prob. If you're doing visual comparison then you need to also account for regional settings.
    "The data in a record depends on the Key to the record, the Whole Key, and
    nothing but the Key, so help me Codd."

  3. #3
    Join Date
    Jan 2003
    Location
    Langley, British Columbia, Canada
    Posts
    13
    visually everything looks the same
    in code, i've compared stored results vs expected results. here's a sample of what i found:

    If i stored, from the Win2003 pc, the value 0:01 (12:01am, no date) in either an access or sql server field, then attempted from a winxp pro machine to compare the stored number to winxp's interpretation of 12:01 am, the values would look to be the same, but vb would not claim them to be equal. if i check the difference between the two, surprisingly, the difference is 1.0842021724855E-19, and that's enough to cause this symptom. the difference fluctuates, with 12:23 am working and being equal when the above steps are followed. the pattern of equal/not equal is very strange indeed.

    i have verified regional settings on both pcs. no problems.

    this all works fine with all pc's being win2003. it seems that 2003 is treating something different, so comparisons to a value stored from the win2003, then compared on another os, it all fails.
    Jeff Jonsson

  4. #4
    Join Date
    Jun 2004
    Posts
    13
    This is not a SQL issue. It's a VB issue. I dont get any problems like this in VB.NET. It's been so long for VB6 and I dont really feel like installing it so I wont be able to do any VB6 testing. Have you tried using VB.NET instead? I'm sure you'll be cursing at VB6 in no time once you switch to .NET.


    Also what version of Access? 97, 2k?

  5. #5
    Join Date
    Jan 2003
    Location
    Langley, British Columbia, Canada
    Posts
    13
    hahahaha

    oh yeah, i've used vb.net and it's a much better development platform for sure. i will test this scenario in vb.net and see what the results are.

    unfortunetly, i am supporting legacy applications and bumping up to vb.net does not give me the immediate solution i require.

    has nobody else observed this behaviour?

    access 97 and 2000
    sql server 2000 (msde and enterprise) v8.00.760
    Jeff Jonsson

Posting Permissions

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