Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. My Ox is Flummed!

My Ox is Flummed!

Scheduled Pinned Locked Moved Database
databaseworkspacecsharpsql-servervisual-studio
6 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    TheComputerMan
    wrote on last edited by
    #1

    I have an SQL Server 2005 Express instance which has a database on it and no problems - all the data is visible and everything works. I have just created another database and in the Visual Studio environment everything is fine and I can 'see' the data. If I compile the setup and install the program on the same machine the program sees no data at all. It has to be something to do with these User instances I am thinking, yet I have not (knowingly) invoked one. Both have an identical connection format:

    Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=" & strDatabase & ";Data Source=" & strServer & ";Type System Version=SQL Server 2005;MultipleActiveResultSets=True

    In the development environment there are 'jobs' set up but it does not see them in the 'non-development' environment. I have checked the properties of both databases and I cannot see any differences between them. I am stumped and could do with someone to come up with the magic solution!! :)

    J 1 Reply Last reply
    0
    • T TheComputerMan

      I have an SQL Server 2005 Express instance which has a database on it and no problems - all the data is visible and everything works. I have just created another database and in the Visual Studio environment everything is fine and I can 'see' the data. If I compile the setup and install the program on the same machine the program sees no data at all. It has to be something to do with these User instances I am thinking, yet I have not (knowingly) invoked one. Both have an identical connection format:

      Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=" & strDatabase & ";Data Source=" & strServer & ";Type System Version=SQL Server 2005;MultipleActiveResultSets=True

      In the development environment there are 'jobs' set up but it does not see them in the 'non-development' environment. I have checked the properties of both databases and I cannot see any differences between them. I am stumped and could do with someone to come up with the magic solution!! :)

      J Offline
      J Offline
      jschell
      wrote on last edited by
      #2

      Rephrasing your question to be sure I understand it. You have a SQL server installed on your local box (no other.) You have data in tables in that database. When you use SQL Server Managment Studio you can see the data in the tables. You have a program which when run in Visual Studio produces data from the tables. When you run the same program from the command line, on the local box, you do not see the data. If all of that is true... Are you catching exceptions and ignoring them?

      T 1 Reply Last reply
      0
      • J jschell

        Rephrasing your question to be sure I understand it. You have a SQL server installed on your local box (no other.) You have data in tables in that database. When you use SQL Server Managment Studio you can see the data in the tables. You have a program which when run in Visual Studio produces data from the tables. When you run the same program from the command line, on the local box, you do not see the data. If all of that is true... Are you catching exceptions and ignoring them?

        T Offline
        T Offline
        TheComputerMan
        wrote on last edited by
        #3

        Yes pretty much true. The program is a windows exe. No I am not ignoring exceptions, they are written to the Event log - and there are none. The program runs just fine, but there is no data visible, in other words when I go to the configuration screen which draws its data from the SQL Express database there is no data, yet it is there running inside Visual Studio. It is as if the database is fresh with no data in it.

        J 1 Reply Last reply
        0
        • T TheComputerMan

          Yes pretty much true. The program is a windows exe. No I am not ignoring exceptions, they are written to the Event log - and there are none. The program runs just fine, but there is no data visible, in other words when I go to the configuration screen which draws its data from the SQL Express database there is no data, yet it is there running inside Visual Studio. It is as if the database is fresh with no data in it.

          J Offline
          J Offline
          jschell
          wrote on last edited by
          #4

          Then you are making an assumption which is not true. The following are possible assumptions. There could be others. - You are connecting to different databases. - You are connecting to different servers. - The data in VS is not commited.

          T 1 Reply Last reply
          0
          • J jschell

            Then you are making an assumption which is not true. The following are possible assumptions. There could be others. - You are connecting to different databases. - You are connecting to different servers. - The data in VS is not commited.

            T Offline
            T Offline
            TheComputerMan
            wrote on last edited by
            #5

            Sorry what assumption am I making? There is only one database There is only one server which is the machine the program, VS and data are on. The data in VS is not committed because it is already in the database. I am reading it not writing it. Thanks for your time on this one :) but I have decided to change over to MySql. I can't be doing with the vagaries of Microsoft.

            J 1 Reply Last reply
            0
            • T TheComputerMan

              Sorry what assumption am I making? There is only one database There is only one server which is the machine the program, VS and data are on. The data in VS is not committed because it is already in the database. I am reading it not writing it. Thanks for your time on this one :) but I have decided to change over to MySql. I can't be doing with the vagaries of Microsoft.

              J Offline
              J Offline
              jschell
              wrote on last edited by
              #6

              TheComputerMan wrote:

              Sorry what assumption am I making?

              It would of course be your assumption, so there is no way for me to know what it is. You have an impossible situation. Since computers are deterministic that means that you made an assumption which is wrong. You can't find assumptions by looking at code (although code might have been written with an assumption in mind.)

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups