Error on Release

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • YSUBrink
    New Member
    • Feb 2008
    • 6

    Error on Release

    Hello,
    I am running Visual Studio 2008 Professional with .NET Framework 3.5. I am having trouble with the published version of my code. In Visual Studio I can run the program in debug with no problems (no errors). However, when I publish the program and try to run the application I get a runtime error. I have pinpointed the failure to where it tries to connect to an Acess database. The code worked one day, then the next failed. No updates were installed before failure. Any ideas? Thanks.
  • Killer42
    Recognized Expert Expert
    • Oct 2006
    • 8429

    #2
    What are the details of the error?

    Comment

    • YSUBrink
      New Member
      • Feb 2008
      • 6

      #3
      "Unhandled exception has occurred in your application. If you click Continue, the application will ignore this error and attempt to continue. If you click Quit, the application will close immediately.
      Argument 'Prompt' cannot be converted to type 'String'"


      It seems to happen when the code is trying to fill the dataset. But as I mentioned earlier, it works when I am debugging in Visual Studio, but not when I publish. Any input?

      Comment

      • Killer42
        Recognized Expert Expert
        • Oct 2006
        • 8429

        #4
        Originally posted by YSUBrink
        "Unhandled exception has occurred in your application. If you click Continue, the application will ignore this error and attempt to continue. If you click Quit, the application will close immediately.
        Argument 'Prompt' cannot be converted to type 'String'"
        Obviously the IDE interpreter is handling things a bit differently somehow. It's a nuisance, but does sometimes happen.

        Sounds as though somewhere in your code, probably when issuing an SQL query, you have a problem with an argument/parameter called "Prompt". Or could this be an argument for a Sub/Function in your code? Anyway, hopefully the name should help to track it down. Perhaps you are passing a null, for example, and the IDE is converting it to zero but the runtime isn't.

        I think your first priority has to be pinning down precisely where the error occurs in your code.

        Comment

        • YSUBrink
          New Member
          • Feb 2008
          • 6

          #5
          I have it pinned down the error to where the code tries to fill my dataset. I am utilizing Microsoft Jet 4.0. But another interesting thing that I have found: I am coding on a 64 bit operating system. I found that to successfully connect to a database on this 64 bit Windows, I need to compile the code with a build configuration of x86. This was never an issue before. Now the code will only work on 32 bit Windows. Has anyone ever heard of this before?

          Comment

          • YSUBrink
            New Member
            • Feb 2008
            • 6

            #6
            I got it to work. I built the program originally in VB 2005 Express. So, I re-installed it and published from there and it worked. Could it have been a .NET 3.5 problem?

            Comment

            • Killer42
              Recognized Expert Expert
              • Oct 2006
              • 8429

              #7
              Originally posted by YSUBrink
              I got it to work. I built the program originally in VB 2005 Express. So, I re-installed it and published from there and it worked. Could it have been a .NET 3.5 problem?
              Interesting question. You might want to ask it on the .Net forum.

              I certainly couldn't say. I'm an old VB6 programmer and haven't worked with the .Net framework yet. Perhaps someone else here knows?

              In the meantime, I'm glad to hear you got your program working.

              Comment

              • YSUBrink
                New Member
                • Feb 2008
                • 6

                #8
                Thank you. I will post the question there.

                Comment

                Working...