I used JetBrains Rider to create an SQLite database (14 tables and 6 views). Rider was more user friendly than Visual Studio 2017. I went back to Visual Studio for the c# programing part. The "SQLite-SQL Server Compact Toolbox" was able to connect to the DB but there were some error messages. For example when I wanted to "Edit top 200 rows" of a table there was an error but the select * worked. More importantly, when I wanted to add ADO object (to use Entity framework) there was an error again.
When I created some tables in VS there was no such problem. So I wonder where can be the problem?
I figured out that the problem is with "SQLite-SQL Server Compact Toolbox". If the definition of the Views has comments then you can not add entity framework based on your database using Visual Studio. Though the database is ok, the select * from myTable works.
Rider has no problem with comments in View.
The toolbox has no problem with comment in table just in the view.
Related
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.
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.
Last year, I used VS2010 to develop a Winforms application. Now, I changed to VS2013 and I faced some problems.
I couldn't find a way to manage SQL Server Compact Edition database files (.sdf) in VS2013. Although I have installed an add-in from this website
But I can only see the top 200 rows of data in the .sdf, I can't open connection in order to add more data with code.
Is there any solution for me ?
Go to Options in the addin, and you change 200 to any number
Could you clarify what you mean by: "cant open connection in order to add more data with code" ?
I've created a database in visual studio 2010 in the following way: Data->Add new datasource->Database->Entity Data Model.
Now, in my wpf app I can load and save data successfully, when closing the
app and opening again the data will still be there, but as soon as I try
retrieve the table data in Visual Studio's Database explorer it returns
an empty table, and running the application after that also returns no data.
It is as if using database explore to query data clears it.
Any help would be greatly appreciated.
Tim Anderson seem to explain what is going on, here:
http://www.itwriting.com/blog/689-where-is-your-sql-server-ce-database.html
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.