Results 1 to 7 of 7

Thread: [RESOLVED] Windows 7 vs XP and ADODB???

  1. #1

    Thread Starter
    Addicted Member aa9gg's Avatar
    Join Date
    Apr 2009
    Location
    Chicagoland
    Posts
    184

    Resolved [RESOLVED] Windows 7 vs XP and ADODB???

    I have a VB6 application that uses a ADODB.Connection, Microsoft.Jet.OLEDB.4.0;(MS Access database .mdb). The program runs fine on my XP machine, but when I run it on a Windows 7 machine, I get errors. At first I was getrting a "invalid use of NULL" error. I fixed that by adding " to my text fields (DATA_KEY.Text = C_rs.Fields("Data_key") & "").

    Ok...I get passed that error now, but now I noticed that when ever it opens the program with the default "empty" database, the Win7 machine automaticaly adds a new entry and screwas up the key. Again...the XP machine runs the software flawlessly.

    What am I doing wrong? is there an issue with Win7?
    FCC Section 97.313(a) “At all times, an amateur station must use the minimum transmitter power necessary to carry out the desired communications.”

    I'd rather run a "Killer-Watt" than a KiloWatt - QRP Rules!!!

  2. #2

    Thread Starter
    Addicted Member aa9gg's Avatar
    Join Date
    Apr 2009
    Location
    Chicagoland
    Posts
    184

    Re: Windows 7 vs XP and ADODB???

    I just noticed that these "new" entries in the database are actually old entries I had deleted! When I look at the db before it packed for distribution it is an empty db. When installed on the XP machine it is still empty. When installed on the Win7 machine it contains the old data somehow! ***????
    FCC Section 97.313(a) “At all times, an amateur station must use the minimum transmitter power necessary to carry out the desired communications.”

    I'd rather run a "Killer-Watt" than a KiloWatt - QRP Rules!!!

  3. #3

    Thread Starter
    Addicted Member aa9gg's Avatar
    Join Date
    Apr 2009
    Location
    Chicagoland
    Posts
    184

    Re: Windows 7 vs XP and ADODB???

    Here is another something else I discovered...on the WIN7 machine, in directory DB, my file at one time contained data X,Y,Z. On my XP machine (were I do my VB programming) I deleted the data X,Y,Z creating an empty database. So...on the WIN7 machine, directory DB, I delete the old file and copy the new empty file. I open the new file and there is data X,Y,Z!....ok I move THAT new file from directory DB to a new directory DB1, open the file...and it's the EMPTY file like it's suppose to be! Any clue as to what is going on????
    FCC Section 97.313(a) “At all times, an amateur station must use the minimum transmitter power necessary to carry out the desired communications.”

    I'd rather run a "Killer-Watt" than a KiloWatt - QRP Rules!!!

  4. #4
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,930

    Re: Windows 7 vs XP and ADODB???

    Which folder are you storing the database in?

    If it is under one of the Program Files folders (or another protected location), you can expect issues like this... For more information, see the article Where should I store the files that my program uses/creates? from our Classic VB FAQs (in the FAQ forum)

  5. #5

    Thread Starter
    Addicted Member aa9gg's Avatar
    Join Date
    Apr 2009
    Location
    Chicagoland
    Posts
    184

    Re: Windows 7 vs XP and ADODB???

    c:\programfiles(x86)\csv1000\database

    It apparently has to do with "imagefiles" from the "restore points" that windows creates. I tried this all again today and could not reproduce the problem! I've been programming for over 30 years (from old skool DOS to windows) and have NEVER seen a file issue like this before. Very strange indeed.
    FCC Section 97.313(a) “At all times, an amateur station must use the minimum transmitter power necessary to carry out the desired communications.”

    I'd rather run a "Killer-Watt" than a KiloWatt - QRP Rules!!!

  6. #6
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,930

    Re: Windows 7 vs XP and ADODB???

    The location is a problem that would cause this kind of issue, most likely due to Virtualisation.

    Folders like ProgramFiles should not be used to store writeable files (even on Windows 2000/XP), and you generally get a "nicer" failure than you would on XP if you tested properly (if you log in to windows as a basic user, the program would give an error and fail to write data, and maybe fail to read it too).

    Use one of the AppData folders instead (the article I linked to explains why and how, and which to choose), as they are designed for data files, and will not have the same issue.

  7. #7

    Thread Starter
    Addicted Member aa9gg's Avatar
    Join Date
    Apr 2009
    Location
    Chicagoland
    Posts
    184

    Re: Windows 7 vs XP and ADODB???

    SUCCESS!!!!! A BIG thanks to si_the_geek for figuring out this one!!!!
    FCC Section 97.313(a) “At all times, an amateur station must use the minimum transmitter power necessary to carry out the desired communications.”

    I'd rather run a "Killer-Watt" than a KiloWatt - QRP Rules!!!

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