I'm trying to design a report in VS2005 BIDS Report Designer, but every so often, I haven't figured out any regular action that might cause it, but when I try and run the query, I get the following error:
An error occurred while retrieving the
parameters in the query.
DeriveParameters requires an open and
available Connection. The connection's
current state is closed
What causes this and what can I do to open the connection again?
Having searched the interwbes for this same problem, the answer validated on my part, is to close and reopen the Visual Studio solution.
Related
I have an error in my form editor preventing me from modifying the form.
I know in which control this occurs but no way to find what exactly causes the problem.
I tried setting breakpoints in the InitializeComponents() of the form I try to open but it doesn't stop (I am in debug mode...). I also tried to attach using a second instant of Visual Studio as demonstrated here, but even when setting all debug exception options to "throw", the attached process doesn't stop and indicate anything about call stack nor other useful information...
All I know is that there is a disposed object I'm trying to access, but absolutely no information as to where in code, etc..
What could I possibly do to debug the situation - knowing which control is the cause but absolutely no idea as to which of the 300 lines of code causes the issue...
I have a model that I'm mapping to DTO. All the mapping should be set up correctly. I'm using:
Mapper.AssertConfigurationIsValid();
I retrieve the model from the db. Its properties, including its child entities are correct and they are exactly what is found in the tables.
However, when I try to map it to DTO:
var entity = myService.Get(id)
var dto = Mapper.Map<myDTO>(entity);
Visual Studio shows the Open File dialog and tries to open the file PrimitiveExtensions.cs. I can't stop the app, and I need to end Visual Studio from the Task Manager.
This problem occurs for only one particular model (and it's child entities). Does it occur because the mapping is not set up correctly?
Most likely your VS tries to open the source file because it breaks on a first chance exception. Usually you should be able to cancel the file open dialog and then analyze the call stack or simply continue running the code.
You can disable breaking on first chance exception in the Debug -> Exceptions dialog.
In case it isn't only a first chance exception but an unhandled one you can tell VS to not try to open the library code by enabling "Enable just my code" in Tools - Options - Debugging.
When I open WebMatrix it works without problem and shows the start page.
When I click 'My sites' and choose my site or choose My site by click 'Open'=> My site or create new site (and choose the site type: Empty, App Gallery or Template Gallery) WebMatrix crashes. Note: It crashes when it needs to show the site pages.
I tried to re-install WebMatrix but that didn't help. I also tried to change the Workspace(by clicking 'Options' on the start page).
When it crashes, I get the message 'Windows is looking for a solution to the problem.' (My computer isn't in English so that might not exactly be the words) and then I am asked if I want to close/debug the program. I click 'Debug' and choose Visual Studio. I don't know how to debug a program, but I tried and it says to me that:
System.NullReferenceException was unhandled
Message: An unhandled exception of type 'System.NullReferenceException' occurred in Microsoft.WebMatrix.Core.dll
Additional information: Object reference not set to an instance of an object [-translated].
I have searched on the internet and here and I didn't find any solution to my problem.
Actual Answer
This bug is in the market for a time now. I have seen similar issue on another forum too, where the user was facing the same issue and same thing he tried but all in vain.
I think you need to wait for the next Update for your System, or try removing each and every component that WebMatrix installed, that means all the .NET Frameworks (4th version), Sql Dependencies Sql Server Ce, and all other files that were shipped along with WebMatrix to your computer. Remove them, and start the installing process once again freshly.
If nothing does the job, please uninstall WebMatrix 3 and install WebMatrix 2: Click here for link. I know it is awkward to go back a version, but you'll have to. Secondly you can mention this bug on their support/suggestion page. They would fix it.
http://webmatrix.uservoice.com/
I hope that would help you. And you'd be back in developing the apps :-)
Just for information
Secondly, do you understand what is meant by debug? Debugging is a method or process to remove the bugs from a software or an application etc. When you chose Visual Studio, it provided you or not provided you with the WebMatrix source code, I am not sure I never tried it. And you tried out debugging it. The exception is gave you, was a message saying that the parameter you're passing onto the next stage is a null. Which means it doesn't even exist and thus the value or the method cannot be executed and it breaks.
I am using MSI project with Installshield 2010.
I wanted to add some SQL Scripts in my project for two different connections. I was trying to clone SQLLogin dialog and configure it for the second connection, I don't know exactly what I did, I exported, imported, deleted, cloned this dialog for many times to experiment some stuff and now, when I test the setup (is not a build error) I get this error:
Error 2878: On the dialog SQLLogin the control RadioButtonGroup1 has a possible value: 0. This is an invalid or duplicate value.
The error appears just before SQLLogin dialog.
After others experiments to fix this error, I deleted the SQLLogin dialog and all my SQL connections to start all over again (I have noticed that SQLLogin dialog is not disponible in a Basic MSI project if a SQL Connection is not setted, the dialog appears in the list after a new Sql Connection is made) and I added a new SQL Connection (I have not made any changes in Sql Connection) and as I supposed, the SQLLogin dialog was generated.
I build the project and run it and the error still occurs.. I don't know how to fix it, if I set a new sql connection to another project all works fine, this is a bug specific for my project.
A bad solution is to start the project again because is a biiiig one..
Any ideas how to fix this error? Maybe I deleted some important variables? Or some actions?!
Any idea is welcome, thanks for your time!
After all operation I have made with the dialogs, the property of RadioButtonGroup1 called IS_SQLSERVER_AUTHENTICATION appears many times in the tables of msi configuration (see Additional Tools tab, Direct Editor -> here you can find all tables of msi).
I delete the duplicated properties, build and run the setup again.
Thanks for help Gabriel!
When I run my application, it drops and re-creates a database.
Between runs, I typically use the VS2010 server explorer view to look at various database objects.
If I forget to right-click the node in the Server explorer and explicitly close the connection, then when I run, the drop/recreate hangs for a while (at which time I can race the timeout and go close the connection if I feel like it) and then throws an exception. This is all fine and expected.
Is there any known mechanism/facility in VS2010 that can help be get the behavior of the pre-execute step that closes the connection for me?