VB variance from machine to machine

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Adrian Parker

    VB variance from machine to machine

    I wrote a VB program on my Windows XP machine. It does multi table queries,
    you can add/delete and edit records, it all worked very beautifully. I was
    very careful to validate data, and on my machine it works very well.

    I compiled it, and sent the executable, which works fine on my machine, to a
    business elsewhere.

    They also have a Windows XP machine. When they run my executable, using the
    same database I use, the program opens and sets all textboxes (which are
    linked to table fields) to blank spaces. When he makes a change to any
    record, that change is copied to every record.


    Has anyone seen any strange things happening when moving code from machine
    to machine?


    Adrian


  • Raoul Watson

    #2
    Re: VB variance from machine to machine


    "Adrian Parker" <adrian.parker@ NOSPAMsympatico .ca> wrote in message
    news:L_95c.2343 $QY2.62788@news 20.bellglobal.c om...
    [color=blue]
    > They also have a Windows XP machine. When they run my executable, using[/color]
    the[color=blue]
    > same database I use, the program opens and sets all textboxes (which are
    > linked to table fields) to blank spaces.
    >[/color]

    Your text fields are most likely set to a "data source". The data source
    points to the database and data. So the database might be pointing to your
    local drive and directory which won't exist on your customer PC (unless you
    reproduce the exact environment).

    This of course can be done programatically , for example:

    Data1.DatabaseN ame = "c:\whereever\w hatdb.md"
    Data1.RecordSou rce = "Select * from ..whatever"
    Data1.Refresh



    Comment

    • Steen Gellett

      #3
      Re: VB variance from machine to machine


      "Adrian Parker" <adrian.parker@ NOSPAMsympatico .ca> skrev i en meddelelse
      news:L_95c.2343 $QY2.62788@news 20.bellglobal.c om...[color=blue]
      > I wrote a VB program on my Windows XP machine. It does multi table[/color]
      queries,[color=blue]
      > you can add/delete and edit records, it all worked very beautifully. I[/color]
      was[color=blue]
      > very careful to validate data, and on my machine it works very well.
      >
      > I compiled it, and sent the executable, which works fine on my machine, to[/color]
      a[color=blue]
      > business elsewhere.
      >
      > They also have a Windows XP machine. When they run my executable, using[/color]
      the[color=blue]
      > same database I use, the program opens and sets all textboxes (which are
      > linked to table fields) to blank spaces. When he makes a change to any
      > record, that change is copied to every record.[/color]

      Maybe a stupid question , but are you sure you've made the path to mdb
      files to "app.path" and not a static path that it was on your machine ??

      It seems like blank spaces in all your text boxes on init, is a database
      not found !!

      [color=blue]
      >
      >
      > Has anyone seen any strange things happening when moving code from machine
      > to machine?
      >
      >
      > Adrian
      >
      >[/color]


      Comment

      • Adrian Parker

        #4
        Re: VB variance from machine to machine


        "Steen Gellett" <HejMedDig@NoSp am.Net> wrote in message
        news:40557f6c$0 $27421$edfadb0f @dread16.news.t ele.dk...[color=blue]
        >
        > "Adrian Parker" <adrian.parker@ NOSPAMsympatico .ca> skrev i en meddelelse
        > news:L_95c.2343 $QY2.62788@news 20.bellglobal.c om...[color=green]
        > > I wrote a VB program on my Windows XP machine. It does multi table[/color]
        > queries,[color=green]
        > > you can add/delete and edit records, it all worked very beautifully. I[/color]
        > was[color=green]
        > > very careful to validate data, and on my machine it works very well.
        > >
        > > I compiled it, and sent the executable, which works fine on my machine,[/color][/color]
        to[color=blue]
        > a[color=green]
        > > business elsewhere.
        > >
        > > They also have a Windows XP machine. When they run my executable, using[/color]
        > the[color=green]
        > > same database I use, the program opens and sets all textboxes (which are
        > > linked to table fields) to blank spaces. When he makes a change to any
        > > record, that change is copied to every record.[/color]
        >
        > Maybe a stupid question , but are you sure you've made the path to mdb
        > files to "app.path" and not a static path that it was on your machine ??[/color]

        Yes. His machine opens the database, because the data in one of his
        non-bound controls (a combo box) is properly receiving data from a query,
        and is being populated properly.


        Adrian


        Comment

        • Adrian Parker

          #5
          Re: VB variance from machine to machine


          "Raoul Watson" <WatsonR@Intell igenCIA.com> wrote in message
          news:17f5c.1427 0$Eg3.575@nwrdn y01.gnilink.net ...[color=blue]
          >
          > "Adrian Parker" <adrian.parker@ NOSPAMsympatico .ca> wrote in message
          > news:L_95c.2343 $QY2.62788@news 20.bellglobal.c om...
          >[color=green]
          > > They also have a Windows XP machine. When they run my executable, using[/color]
          > the[color=green]
          > > same database I use, the program opens and sets all textboxes (which are
          > > linked to table fields) to blank spaces.
          > >[/color]
          >
          > Your text fields are most likely set to a "data source". The data source
          > points to the database and data. So the database might be pointing to your
          > local drive and directory which won't exist on your customer PC (unless[/color]
          you[color=blue]
          > reproduce the exact environment).
          >
          > This of course can be done programatically , for example:
          >
          > Data1.DatabaseN ame = "c:\whereever\w hatdb.md"
          > Data1.RecordSou rce = "Select * from ..whatever"
          > Data1.Refresh[/color]

          I used a relative path. Or, in other words, I left the directory prefix off
          and just quoted the filename. Hi DB is in the same folder as is the EXE,
          which is correct.

          It's finding the database, because some of the data is displayed properly.
          I have a combo box which is filled using an sql query.



          Adrian


          Comment

          • Gemini

            #6
            Re: VB variance from machine to machine

            Adrian Parker wrote:
            [color=blue]
            > I wrote a VB program on my Windows XP machine. It does multi table queries,
            > you can add/delete and edit records, it all worked very beautifully. I was
            > very careful to validate data, and on my machine it works very well.
            >
            > I compiled it, and sent the executable, which works fine on my machine, to a
            > business elsewhere.
            >
            > They also have a Windows XP machine. When they run my executable, using the
            > same database I use, the program opens and sets all textboxes (which are
            > linked to table fields) to blank spaces. When he makes a change to any
            > record, that change is copied to every record.
            >
            >
            > Has anyone seen any strange things happening when moving code from machine
            > to machine?
            >
            >
            > Adrian
            >[/color]

            Usually, when I do database programming, and the fields are blank, its
            because MDAC isn't installed on the target machine, or some other
            databasing component (depending on what you're using to connect to the
            data file).

            The best thing to do is use the Package & Deployment Wizard to create an
            installation for your program, then install it on the target machine.
            This will ensure the target machine has all the needed ActiveX Controls
            that VB so heavily relies on.

            It usuallt works without a hitch, or installation on the development
            machine because by installing the development enviroment, that also
            installs all the needed controls, etc.

            Hope this helps

            g
            z

            Comment

            • Adrian Parker

              #7
              Re: VB variance from machine to machine


              "Gemini" <spam@nospam.or g> wrote in message
              news:66ae1$4056 0bf1$d89e2d68$1 5366@dcanet.all thenewsgroups.c om...[color=blue]
              > Adrian Parker wrote:
              >[color=green]
              > > I wrote a VB program on my Windows XP machine. It does multi table[/color][/color]
              queries,[color=blue][color=green]
              > > you can add/delete and edit records, it all worked very beautifully. I[/color][/color]
              was[color=blue][color=green]
              > > very careful to validate data, and on my machine it works very well.
              > >
              > > I compiled it, and sent the executable, which works fine on my machine,[/color][/color]
              to a[color=blue][color=green]
              > > business elsewhere.
              > >
              > > They also have a Windows XP machine. When they run my executable, using[/color][/color]
              the[color=blue][color=green]
              > > same database I use, the program opens and sets all textboxes (which are
              > > linked to table fields) to blank spaces. When he makes a change to any
              > > record, that change is copied to every record.
              > >
              > >
              > > Has anyone seen any strange things happening when moving code from[/color][/color]
              machine[color=blue][color=green]
              > > to machine?
              > >
              > >
              > > Adrian
              > >[/color]
              >
              > Usually, when I do database programming, and the fields are blank, its
              > because MDAC isn't installed on the target machine, or some other
              > databasing component (depending on what you're using to connect to the
              > data file).[/color]

              That'll be it!

              Thanks.

              He won't have MDAC installed, he'd have no reason too.

              [color=blue]
              > The best thing to do is use the Package & Deployment Wizard to create an
              > installation for your program, then install it on the target machine.
              > This will ensure the target machine has all the needed ActiveX Controls
              > that VB so heavily relies on.
              >
              > It usuallt works without a hitch, or installation on the development
              > machine because by installing the development enviroment, that also
              > installs all the needed controls, etc.
              >
              > Hope this helps[/color]

              Very much, thank you.



              Adrian


              Comment

              • Adrian Parker

                #8
                VB Package &amp; Development Wizard


                "Gemini" <spam@nospam.or g> wrote in message
                news:66ae1$4056 0bf1$d89e2d68$1 5366@dcanet.all thenewsgroups.c om...[color=blue]
                > Adrian Parker wrote:
                >
                > Usually, when I do database programming, and the fields are blank, its
                > because MDAC isn't installed on the target machine, or some other
                > databasing component (depending on what you're using to connect to the
                > data file).
                >
                > The best thing to do is use the Package & Deployment Wizard[/color]

                Where do you find this Package & Development Wizard? My school has VB 6
                licenses, but I do not see this utility anywhere in VB.



                Adrian


                Comment

                • Adrian Parker

                  #9
                  Re: VB Package &amp; Development Wizard

                  Nevermind, found it.

                  It's output is really messy. Makes a LOT of files, a new directory, etc.


                  Adrian



                  "Adrian Parker" <adrian.parker@ NOSPAMsympatico .ca> wrote in message
                  news:NvL5c.1405 9$E71.901534@ne ws20.bellglobal .com...[color=blue]
                  >
                  > "Gemini" <spam@nospam.or g> wrote in message
                  > news:66ae1$4056 0bf1$d89e2d68$1 5366@dcanet.all thenewsgroups.c om...[color=green]
                  > > Adrian Parker wrote:
                  > >
                  > > Usually, when I do database programming, and the fields are blank, its
                  > > because MDAC isn't installed on the target machine, or some other
                  > > databasing component (depending on what you're using to connect to the
                  > > data file).
                  > >
                  > > The best thing to do is use the Package & Deployment Wizard[/color]
                  >
                  > Where do you find this Package & Development Wizard? My school has VB 6
                  > licenses, but I do not see this utility anywhere in VB.
                  >
                  >
                  >
                  > Adrian
                  >
                  >[/color]


                  Comment

                  • Gemini

                    #10
                    Re: VB Package &amp; Development Wizard

                    Adrian Parker wrote:
                    [color=blue]
                    > Nevermind, found it.
                    >
                    > It's output is really messy. Makes a LOT of files, a new directory, etc.
                    >
                    >
                    > Adrian[/color]

                    <snip>

                    Right, but the core of those (only a couple of files) is all thats
                    needed. The ones in SUPPORT aren't needed for distribution. I think you
                    just need the setup.exe, setup.lst and the CAB file and you're good to
                    go. The files in the SUPPORT directory basically represent whats in the
                    CAB file.

                    Also, you can d/l the updated Visual Studio Installer. It has a great
                    script for creating VB Installations.

                    Scott Zielinski

                    Comment

                    • Adrian Parker

                      #11
                      Re: VB Package &amp; Development Wizard


                      "Gemini" <spam@nospam.or g> wrote in message
                      news:e68e5$4058 6248$d89e2d68$6 133@dcanet.allt henewsgroups.co m...[color=blue]
                      > Adrian Parker wrote:
                      >[color=green]
                      > > Nevermind, found it.
                      > >
                      > > It's output is really messy. Makes a LOT of files, a new directory,[/color][/color]
                      etc.

                      [color=blue]
                      > Right, but the core of those (only a couple of files) is all thats
                      > needed. The ones in SUPPORT aren't needed for distribution. I think you
                      > just need the setup.exe, setup.lst and the CAB file and you're good to
                      > go. The files in the SUPPORT directory basically represent whats in the
                      > CAB file.
                      >
                      > Also, you can d/l the updated Visual Studio Installer. It has a great
                      > script for creating VB Installations.[/color]

                      How does one make a single file EXE which installs everything needed?


                      Also, when you create a package on Windows 2000, then install on XP, it
                      replaces system files. Then XP complains that your system might be
                      unstable.



                      Adrian


                      Comment

                      • Gemini

                        #12
                        Re: VB Package &amp; Development Wizard

                        Adrian Parker wrote:
                        [color=blue]
                        > "Gemini" <spam@nospam.or g> wrote in message
                        > news:e68e5$4058 6248$d89e2d68$6 133@dcanet.allt henewsgroups.co m...
                        >[color=green]
                        >>Adrian Parker wrote:
                        >>
                        >>[color=darkred]
                        >>>Nevermind, found it.
                        >>>
                        >>>It's output is really messy. Makes a LOT of files, a new directory,[/color][/color]
                        >
                        > etc.
                        >
                        >
                        >[color=green]
                        >>Right, but the core of those (only a couple of files) is all thats
                        >>needed. The ones in SUPPORT aren't needed for distribution. I think you
                        >>just need the setup.exe, setup.lst and the CAB file and you're good to
                        >>go. The files in the SUPPORT directory basically represent whats in the
                        >>CAB file.
                        >>
                        >>Also, you can d/l the updated Visual Studio Installer. It has a great
                        >>script for creating VB Installations.[/color]
                        >
                        >
                        > How does one make a single file EXE which installs everything needed?
                        >
                        >
                        > Also, when you create a package on Windows 2000, then install on XP, it
                        > replaces system files. Then XP complains that your system might be
                        > unstable.
                        >
                        >
                        >
                        > Adrian
                        >
                        >[/color]

                        You could package those couple of files into a self-extracting archive.
                        Like WinZip, or something similar.

                        Also, the Vis Stud Inst creates a single .msi file (much like an .exe
                        file, but requires the Windows Installer to be on the system) Most
                        Win2k+ computers have it built in.

                        Scott C. Zielinski

                        Comment

                        • Adrian Parker

                          #13
                          Re: VB Package &amp; Development Wizard


                          "Gemini" <spam@nospam.or g> wrote in message
                          news:e2fa0$405f 1533$d89e2d68$4 398@dcanet.allt henewsgroups.co m...[color=blue]
                          > Adrian Parker wrote:
                          >[color=green]
                          > > "Gemini" <spam@nospam.or g> wrote in message
                          > > news:e68e5$4058 6248$d89e2d68$6 133@dcanet.allt henewsgroups.co m...
                          > >[color=darkred]
                          > >>Adrian Parker wrote:[/color][/color][/color]
                          [color=blue][color=green]
                          > > Also, when you create a package on Windows 2000, then install on XP, it
                          > > replaces system files. Then XP complains that your system might be
                          > > unstable.[/color][/color]

                          [color=blue]
                          > You could package those couple of files into a self-extracting archive.
                          > Like WinZip, or something similar.
                          >
                          > Also, the Vis Stud Inst creates a single .msi file (much like an .exe
                          > file, but requires the Windows Installer to be on the system) Most
                          > Win2k+ computers have it built in.[/color]

                          When I make a package on Windows 2000, then use the installer on XP, it
                          replaces required Windows librairies. The system then complains it may be
                          unstable. Is there any way to avoid this?


                          Adrian


                          Comment

                          • Gemini

                            #14
                            Re: VB Package &amp; Development Wizard

                            Adrian Parker wrote:
                            [color=blue]
                            > "Gemini" <spam@nospam.or g> wrote in message
                            > news:e2fa0$405f 1533$d89e2d68$4 398@dcanet.allt henewsgroups.co m...
                            >[color=green]
                            >>Adrian Parker wrote:
                            >>
                            >>[color=darkred]
                            >>>"Gemini" <spam@nospam.or g> wrote in message
                            >>>news:e68e5$4 0586248$d89e2d6 8$6133@dcanet.a llthenewsgroups .com...
                            >>>
                            >>>
                            >>>>Adrian Parker wrote:[/color][/color]
                            >
                            >[color=green][color=darkred]
                            >>>Also, when you create a package on Windows 2000, then install on XP, it
                            >>>replaces system files. Then XP complains that your system might be
                            >>>unstable.[/color][/color]
                            >
                            >
                            >[color=green]
                            >>You could package those couple of files into a self-extracting archive.
                            >>Like WinZip, or something similar.
                            >>
                            >>Also, the Vis Stud Inst creates a single .msi file (much like an .exe
                            >>file, but requires the Windows Installer to be on the system) Most
                            >>Win2k+ computers have it built in.[/color]
                            >
                            >
                            > When I make a package on Windows 2000, then use the installer on XP, it
                            > replaces required Windows librairies. The system then complains it may be
                            > unstable. Is there any way to avoid this?
                            >
                            >
                            > Adrian
                            >
                            >[/color]
                            Don't know too much about the imstaller and WinXP

                            g
                            z

                            Comment

                            Working...