My Ox is Flummed!
-
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!! :)
-
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!! :)
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?
-
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?
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.
-
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.
-
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.
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.
-
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.
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.)