Is there a model browser window for LINQ to SQL? - visual-studio

I'm looking for a way to list the tables/objects in a LINQ to SQL model, and search them, similar to the Model Browser window for Entity Framework.

Are you using MS SQL Server? If so you should be able to use the Database Diagrams.

It turns out that in Visual Studio 2017 the model browser can be activated by pressing Ctrl+1 if the edmx diagram is displayed at the same time.

For a work-around, I'm editing the *.dbml file directly. However, this seems much more error prone (copy-paste errors, requires more knowledge of framework, etc.), for repetitive changes.
UPDATE (and actual fix):
I had to install SQL Server Data Tools (SSDT) for my specific version of Visual Studio. This doesn't have to match your target version of SQL Server.
See here for Visual Studio 2017:
https://learn.microsoft.com/en-us/sql/ssdt/download-sql-server-data-tools-ssdt?view=sql-server-2017
Note that using the standalone installer did NOT work for this purpose (LINQ to SQL model browser). Only using the Visual Studio installer, and after a restart did the browser load.
I didn't update this answer immediately, so there may be something I'm missing; please add more detail if you encounter this issue.

Related

Oracle Developer Tools for Visual Studio, how to setup intellisense

I'am staring using Oracle Developer Tools for Visual Studio Code but miss something versus what i did in past with sql server tools:
Let's say i have a table whit this name
T_PREFIX_TABLENAME
I'am used to type part of TABLENAME and find it: simply typiyng "TABL" make intellisense working and finding corrispondent result with a like operation, with ODT this does not work and i have to type the initial part of the table name to find it, let's say "T_PREFIX_TABL" to find same results
Since all table have a long common prefix (databas is not mine so cannot change this) i have to write large part of text making intellisense quite unuseful.
I try even Oracle Developer Tools for Visual Studio 2019 with visual studio 2019 professional but in this case intellisense simple does nothing.
I try other way: drag & drop table or comlumn from server explorer to query windows but in visual studio 2019 an entire select query in created while in vs code nothing appens.
Is there a way to have intellisense smart like the sql server tools one's?
Thanks
I believe this issue with autocomplete incorrectly doing a "begins with" search, was a bug introduced in Oracle Developer Tools for VS Code version 19.3.3. It has since been fixed in 19.3.4.

VS 2019 - SSAS Tabular model explorer missing or greyed out

I searched many times, but there was no answer from MSFT or any other communities for this issue.
I have the Community edition 2019. Tabular model explorer is greyed out in the View->Toolbar->Other windows. I have no luck with VS 2017 EE as well, the same problem there too.
I could able to use the Import Datasource button on the Model menu and pull the source tables for building, however, Tabular model explorer and the data source folders are missing or not being able to use from a project perspective. Since the tabular model explorer is missing, I couldn't able to use the data transform window for each table and thus literally making a stop on development.
This is really annoying.
Here is VS 2019 system info
Microsoft Visual Studio Community 2019
Version 16.5.3
VisualStudio.16.Release/16.5.3+30002.166
Microsoft .NET Framework
Version 4.7.03062
Installed Version: Community
SQL Server Analysis Services 15.0.19049.0
Microsoft SQL Server Analysis Services Designer
Version 15.0.19049.0
SQL Server Data Tools 16.0.62003.05170
Microsoft SQL Server Data Tools
SQL Server Integration Services 15.0.2000.93
Microsoft SQL Server Integration Services Designer
Version 15.0.2000.93
SQL Server Reporting Services 15.0.19049.0
Microsoft SQL Server Reporting Services Designers
Version 15.0.19049.0
[Update 04/10/2020- Attached screenshot of the greyed out window menu]
[SSAS Tabular Explorer Window greyed out]1
In your screenshot, Model.bim does not appear to be open. You have to open it for Tabular Model Explorer to show up. Double click Model.bim in Solution Explorer.
Other issues that I don't believe apply to you, but may to others:
The Compatibility Level of the model must be at least 1400. Check by selecting Model.bim in Solution Explorer and then look in the Properties Window.
You also must have the Analysis Services extension installed. Search on "SSDT" for current installation steps.
If you left click on the Model.bim File in solution explorer and look at the properties window you should see Compatibility Level is 1103 or less. You will need to upgrade to a newer compatibility level to use Tabular Model Explorer. What version is your SSAS Server? You can upgrade to that level or lower.
You are probably using compatibility level 1400, in which you have to click on the Design button instead - see this Microsoft reply.
You need to install the Analysis services tabular projects extension from the Marketplace. Post that you should be able to see the tabular model explorer
I have 1400 compatibility level and still the tabular explorer didn't show up, it was greyed, it's some kind of bug, you can solve it by simply double clicking again on the model and opening it.

VS2010 depends on SQL Server Compact 3.5 for IntelliSense?

I've just recently installed VS2010 Professional (trial) on my WinXP machine. Knowing that I only needed it for a VC++ project (with no databases), I "unchecked" the install options for SQL Server.
However, when I try to create a new project (I've tried all variations of MFC and Win32 project types), I am presented with a lovely error message box:
An error occurred while creating or opening the C++ browsing database file c:\path-to-project\testProject.sdf. IntelliSense and browsing information will not be available for C++ projects.
Ensure that Microsoft SQL Server Compact 3.5 is installed and that no other applications are accessing the file. If this problem persists, delete the file and reopen the solution.
If I hit "Ok" VS will still allow me to "develop," except for when I try to add an event handler to a control. Then I am given:
An error has occurred in the script on this page.
The solution's source code database may not have been opened. Please make sure the solution is not open in another copy of Visual Studio, and this its .sdf file is not read only.
Should I have checked the install SQL Server option? If so, why? I don't want it, nor will I be using it. Or rather, what do I need to do to make things work without the errors?
EDIT/Solution
So, it turns out that since the machine I was installing on is not connected to the internet, it was not getting those "wonderful" Microsoft updates, which coincidentally would've installed SQL Server Compact for me! much thanks to #ErikEJ for the clarification.
You have to install Sql Server Compact 3.5 with your Visual Studio because MFC application projects use a temporary database by default. IntelliSense, F12, Shift+F12 and viewing class diagrams will not be available without this database.
IntelliSense will still work when developing c# applications, but not when developing MFC applications.

RDLC 2005 conversion to RDLC 2008 : Custom code not "seen" anymore

I have some issues with my reports since I have updated them to VS2010 format.
Even though I have modified references to from v9 to 10 for Microsoft.ReportViwer.Common and Microsoft.ReportViewer.WinForms as well, when I try to type code. in a field, what is after "Code." is always underlined with red and I get #ERROR instead of the value I want when I print the report. I know it is case sensitive and I double checked the spelling multiple times.
Moreover, I don't know why but I have errors with the Fields! syntax; I seem to have to use the Fields().value to get them to work (at the places I don't need to call custom code too)
These reports worked well before conversion (over 20 reports converted this way) but do not now. Seems like custom functions are not "seen" by the report designer. I tryed to make them public, shared; all I had is the same stupid #ERROR display.
I want them to work in VS2010 to avoid always having to modify them in VS2008 and then go back in VS2010
It's a winform application with framework 3.5
Any idea of what could cause that and what is the remedy?
Many thanks
Nico
There are a couple of ways to use custom code in SSRS. Firstly you can enter VB directly into the window under
Report -- >Report Properties --> Code
Another way is to write a custom DLL (which can be done in any .NET language of course), which then needs to be copied to both your dev machine and the production report server.
You then need to create references to that assembly in the project using:
Report --> Report Properties --> References (I assume you know this).
If you are not using your own custom assembly, and just using a reference to one on your machine then there could be some confusion on the server as to where to find the dll's. You may need to copy DLL's to the folder as indicated in the KB link below:
http://support.microsoft.com/kb/920769
When you drag a field onto a tablix or textbox, and have a look at the value expression, does it use the Fields!Fieldname.Value syntax? That syntax is natural to SSRS so it sounds like something seriously broken in your visual studio 2010 there if that is not working. I take it you installed visual studio 2010 to create web applications. What you haven't explained is which version of BIDS or SSDT you are using. If you are developing reports for SSRS 2008 R2 or earlier, then these are not compatible with visual studio 2010. There's no compromise there.
If you are developing for SSRS 2012, then you are using either SSDT by itself (which installs a shell version of visual studio 2010) OR if you already have visual studio 2010 then you need to install service pack 1 for VS2010 and then install SSDT from the SQL Server 2012 disc.
http://msdn.microsoft.com/en-us/library/hh500335(v=vs.103).aspx

New visual Studio 2010 Database project and database diagrams

I am experimenting with the database project in Visual Studio 2010. The schema diff and management of scripts looks great, but where are the database diagrams? I would like to design the tables visually, but still make use of the versioning/comparison/deployment tools in VS2010. I didn't see any option in the database project to create a diagram. Is that not supported?
You could create the diagrams in SSMS (or another diagramming/modelling tool) as you would do normally, and synchronize the structure back to your Visual Studio Database Project, although you'll need the Premium or Ultimate version of Visual Studio to use this feature.
I'm not sure if this is what you are looking for,
but I suggest you add an Entity Diagram (Entity Framework) to your
project / solution. This will allow you to design/describe your data model(s)
either by drawing them visually or by importing an existing database schema.
Entity Framework information:
http://msdn.microsoft.com/en-us/library/aa697427(VS.80).aspx
Tutorial (for EF 2.0 but still relevant)
http://blog.garypretty.co.uk/index.php/2009/05/20/tutorial-entity-framework-v20-model-first-using-visual-studio-2010-and-net-40/
I hope this helps you get started
There certainly is diagramming support.
Open the "Server Explorer"
Create/open a data connection.
You should see "Database Diagrams", which will function very similarly to the same function in SQL Server Management Studio.
Bam.
Note, I'm referring to V2010 Ultimate.

Resources