Treeview cannot be null - sql

I am getting an error that makes no sense when saving a table created within VS2012, SQL Express 2008 R2.
Item in the Virtualizing TreeView cannot be null
This is a table save not a rebuild, unless that happens anyway. But I do not get this error at any other time, even after creating new web page, or saving changes to an existing page.
Really not sure where to look for the cause. I have not changed any of the pages that use the treeview in over 3 years. They are in a totally different part of the web site.
Any help appreciated.

I also encountered the same problem some time ago and landed here to see not much solution has been provided.
What I found is that, if that instance of VS is closed and a new instance is reopened then that error is getting resolved.

Hi you can go to server explorer in VS and right click on your connection. It will ask you for Database Diagramming select yes for it. Now you will not get this error.

Related

MS Access error on opening database

I work with Access daily, and this situation is unlike anything I've ever seen Access do:
I created a database tool in Access for a report I run at work. The other day I was using it, and Access abruptly closed itself down. I went to reopen the tool, and I got an error saying "Microsoft Access has stopped working. A problem has caused the program to stop working correctly. Windows will close the program and notify you when a solution is available."
A few minutes later it prompts me to create a backup, which also does the same thing when I try to open it...
...unless...
I open Access itself and search for the original tool. Then it opens just fine.
I have tried repairing this database, and nothing works. It simply won't let me open this tool unless I go through Access first.
Does anyone have any ideas on this? What gives???
(Windows 7 Enterprise Edition, MS Access 2007)
A few things I would try
1) Create an entirely new DB, and import all of the objects from the problematic database. Any corrupt objects will show as an error during that process. You may get lucky and the new DB can simply be the new production DB.
2) Hold down the Shift key as Access is loading to bypass any startup code.
The problem is likely in the VBA link, which the new DB shell will fix.

Visual Studio SQL Server Object Explorer Not Saving Connections

I'm using Visual Studio 2012 for development. I really like using the SQL Server Object Explorer to work on database related tasks (queries, schema changes etc.). The issue is, every time I reload the IDE, I have to connect to the databases I work with. Is there a way to persist the list of databases like I can with the Server Explorer tab?
When you say you can't replicate, how long have you been using the explorer for to attempt to replicate it? It only loses the connections every now and then, so in fact right now I can't replicate it either, but over the next few days I'm sure they will get reset again!
It seems that there is something wrong with your VS IDE
It seems that this is a little bit unlikely as the same thing happened to me when I was running in VS 2012 beta running on Win 8 Release Preview too.
However I will try your suggestions and i'll see what happens, just to clarify are you saying that I run those commands once and then after that use VS as usual or are you saying that I try running in safe mode all the time?
Is reset settings same as the Import and Export settings->Reset All Settings menu item? (By the way I run with general development settings)
Anyone know where these connection settings are actually stored (registry, folder ...)?
Open VS. DonĀ“t open any project or solution.
Add your databases in the Server Explorer.
Then File -> Save All

Can't add database reference to VS2012 project

I have a SQL Server CLR trigger project that was created in VS2008. Opening the project in VS2012 does not present any problem, but on build of the solution, I get SQL71501 errors, with Trigger: [...] has an unresolved reference to object [...].
Based on my reading, this is due to a missing database reference in the project. When I try to add a database reference, I get the Add Database Reference dialog that gives me three options:
Database projects in the current solution ** this option is grayed out/disabled
System database (only shows system DBs)
Data-tier Application (.dacpac) ** there are no options to select as this was not how I created the project.
Further reading suggested that the reason there are no database projects to select for the first option, is because no Data Connections have been added via the Server Explorer. In my case there are certainly Data Connections present, and while my project is open, I can quite happily browse the database, look at data etc.
I thought it might have something to do with the Target Framework, so I have tried targeting 3.5 and even 2, but the same problem occurs.
I feel like I'm missing something fundamental, but just can't quite work it out. Any help would be GREATLY appreciated.
I've seen this dialog not enable the 'OK' button because the Database Variable that it defaults is invalid (in my case it had a '.' in it).
The clue to this being the error is that the text in the 'Example Usage' field contains the error message - it's just hard to see as it's dark grey on light grey.
Editing the Database Variable name fixes this.
I found a workarroud for this, isn't optimal but at least it works:
try this
- open sql server object explorer
- create a new connection to your server
- right click on the database and select create new the project...
- the wizard will create the project with all the references and connection string attached to it.
cheers!
I changed my answer
The problem is you cannot assume an insert is a single row and you can really only reference the primary key as a single value inside the trigger

How do I edit an Access ADP file?

So I have this Access Database Project file that I have been tasked to edit. I have Access 2003 and 2007 installed. The ADP only supports 2003 for some reason. Anyway, the issue I have is that I can't figure out how to get to the VBA code in behind things.
The previous developers have done a very good job of locking everything down on the GUI such that the only thing I get when I open the application is a notice saying that it can't find the database on the server. (More than likely there is a problem there too, but since I can't look at code I don't know for sure.)
Does anyone know how to get around the GUI lockdown that has gone on here?
Michael
As it turns out, you can edit an ADP file that has all of the form information turned off by finding the file using Windows Explorer by highlighting the file, then hold shift, and then hit enter. You continue to hold shift until the interface is loaded.

Website Data Source is empty

This is driving me insane. I am trying to get a basic Report to show with Report Viewer but cant get the DataSet to show in the Website Data Source window no matter what I do.
I created a dataset..picked the proc I want, etc. without any problems. I added my RDLC and tried adding a table that I can bind data to but the Windows that contains the Data Sources is empty.
Im using VS 2008. Is there anything im doing wrong? Ive followed some tutorials but cant get further due to this issue.
Ok..figured it out after wasting 1 day on it.
As I said i am running VS 2008 and what I did was remove all the DLL references one by one until the window populated with some datasources. I found out a reference to Entity Spaces cause the problem. So I create the reports and when im down add back the reference. A pain but it now works.
Jeeesh.