Set up Visual Studio for using LINQ with Interbase - visual-studio-2010

I've recently come into possession of an Interbase SQL database. The database itself is from 2006. From my own research I've determined that the Interbase database can be connected to in one of two ways, either ODBC or ADO.NET 2.0.
I've managed to add an ODBC data connection in Visual Studio. My boss has decided that it's awful to perform queries this way and is convinced there's a way to use LINQ, maybe by using Firebird.
One of the constraints of the project is that we need to eventually connect the database to a SharePoint application. If anyone has any ideas for something that could work outside of SharePoint we're not opposed to creating a web service.

With Firebird, you can use this Entity Framework provider. I don't know such providers for Interbase, but may be there is some too.

Related

How to uninstall deprecated Oracle Data Provider?

I am trying to install Oracle Developer Tools for Visual Studio 2015 so that I can connect to a remote 11g database from SSRS/Visual Studio Projects in general, from my dev machine. When I go to the downloads page, I see this:
So I went to Visual Studio to determine whether I already had ODT, and found this:
However, I don't think I installed this ODP, and it just came with the Visual Studio installation. Is there a way to uninstall this provider, or am I OK to just install the new ODT over top? Lastly, as I did more research for this post I became a little more unsure: does ODAC include ODP.net?
Thanks.
Microsoft OLE DB Provider for Oracle and .NET Framework Data Provider for Oracle are providers from Microsoft, i.e. they are part of your Windows installation.
Indeed, they are deprecated from many years, however there is no reason to remove them. They are just two little DLL's.
It is no problem to install Oracle Provider for OLE DB and Oracle Data Provider for .NET (ODP.NET) from Oracle, the drivers from Oracle and the drivers from Microsoft do not interfere with each other.
Yes, ODAC (Oracle Data Access Components) is a collection of various drivers, ODP.NET, OLE DB, ODBC and a few more.
Just a note, unless you use the ODP.NET Managed Driver all drivers mentioned above require an Oracle Client installation, typically an Oracle Instant Client. I think the Oracle Instant Client is also included in the ODAC package.
Maybe have a look at this post to get a little overview: How to connect to Oracle 11 database from . net

Can't add Local Database to project

This might be a really dumb question... but in VS2013 when trying to add a local database to my Windows Forms Application Project the option is now shown in the C# items menu. The only DB that is available is a Service-Based DB. From what I understand, this is related to SQL Compact Edition but I do have SQL Server 2012 installed. Any ideas? Or are there any significant differences between the Local DB and Service-Based DB?
A service-based database is a database that is only accessed through a server. It uses an MDF data file, which is SQL Server format. To be able to connect to a SQL Server database the SQL Server service must be running, because it's that that processes your requests and access the data file.
A local database is one that is local to your application only. It uses an SDF data file, which is SQL Server CE (Compact Edition) format. There is no need to install a server to access an SDF database. You simply distribute the DLLs that constitute SSCE along with your app and access the data file directly.
You'd normally only use SSCE if the data was to be accessed by your app only and there was a relatively small amount of data. For your project you would use SQL Server. For testing purposes you can use the free Express Edition. When deployed you might still use SSEE or you might use a full version of SQL Server. Note that Microsoft include SSEE with their own RMS POS software. SSEE is limited to databases of 4GB though, so even if you start out with SSEE and it can handle the load, you may still have to upgrade at some point in the future based on data capacity.
Source of info:jmcilhinney post.
for help on creating the database have a look at this tutorial it may be of some help.
Hope this info helps you :)
It turns out VS2013 dropped the .sdf format.
Is Microsoft dropping support for SDF database files in Visual Studio?
The answer is yes: Microsoft is silently dropping support (as usual IMHO) to Sql Compact Edition.
It started abandoning Sql CE 3.5 in Vs2012 It continued dropping Sql CE in Sql Management Studio 2012 and finally in VS2013
You can use CompactView or install SQL Server Compact Toolbox extension in VS2013 or (my prefered solution) use Sql management Studio 2008
UPDATE thanks to Nicolas' comment
As stated by Microsoft:
SQL Server compact edition is in deprecation mode with no new releases planned near future. Last release SQL CE 4.0SP1 (and earlier releases that are still in the support cycle) will continue to be supported through its lifecycle and Microsoft is committed to fix any major, production blocking issues found in these releases.
Have you tried adding your local database from inside the project? Have a look and see if you can add your database from datasources.

Entity Framework 6 (5) connection to Oracle

I am attempting to write a Data Access library for our suite of applications that use Oracle in .net. We currently use NHibernate and are thinking of migrating away as it appears to not be supported all that well.
I am working with Visual Studio 2013 and we have already constructed our Oracle Database. We don't have writes to update it (that is the domain of the db guys). So that will not be part of any calculation on our end.
The client on the server is 32 bit, so we are going to stick with that for now. It is already GAC'd in there, and no need to change it. So we have the 32 bit client on our development boxes.
I have EntityFramework 6.1.0 installed into my project via nuget. I have ODAC 1.112.3.20 installed in my project. The 32bit version of the application. I also have the ODP.net.x86 driver installed (also via nuget).
The problem is that everytime I attempt to create an ADO.net Database connection, the oracle provider is never an option? What am I missing? What do I need to get this to work?
I read an oracle forum one time that said I need to set my Entity Framework to 5.0 and not 6.0. Which is fine, but how do I do that?
EF 6 support is now provided by ODAC 12c Release 3 Beta:
From the .Net Developer newsletter (emphasis mine):
New Download: ODAC 12c Release 3 Beta The new ODAC beta includes
Entity Framework 6, Code First, Code First Migrations, .NET Framework
4.5.2 certification, managed ODP.NET XML DB, and managed ODP.NET distributed transaction support without Oracle.ManagedDataAccessDTC.dll.
I know this is getting a little old, but this is to answer the last part of your question (how to install EFv5). (Instructions written for VisualStudio 2013) with your solution open, click TOOLS->NuGet Package Manager->Package Manager Console. Enter the following:
Install-Package EntityFramework -Version 5.0.0
Edit
It’s been a while since I set up my machine, but I think this is what I had to do, hopefully it helps.
Setup:
Install Oracle Instant Client (or whatever you do for an Oracle Home)
Install ODTwithODAC121012 (if you Google that, it should come up)
Make sure your tnsnames.ora is in the right place for your Oracle Home
Setting up a new Visual Studio Solution:
New Solution (for me, of type ASP.NET Web Application)
Run command as in original answer
Add new project of type Class Library (for Model/Entities)
In new project, add new Item of type ADO.NET Entity Data Model
In Entity Data Model Wizard:
EF Designer from database (if you are using an existing database)
New Connection
In Data Source, there is (hopefully) an Oracle Database option
And below that, in data provider, I chose the ODP.NET Managed Driver
Enter user/pass, select Data Source and name connection
Edit 2
Oh, I forgot one thing, not sure if it's important. You may need to add a reference in that Model project to the oracle driver. Right click project -> Add -> Reference -> Assemblies -> Search for 'oracle', hopefully there is an entry for Oracle.ManagedDataAccess (my version was 4.121.1.0)
A few rants:
I don't think the process should be quite so difficult
I don't know why it takes them so long to update either. http://www.devart.com/ seems to do just fine staying on top of new Oracle/Visual Studio changes (they charge, but so does Oracle)
The conspiracy part of my brain says that Oracle has no interest in making it easier for you to not use their products and so they put no effort into it
Their default number mappings can really screw you up. For example, if your Oracle DB has fields of type NUMBER(10), it will map it as a 32-bit int, when not all 10 digit numbers fit :(
For more info on that mapping thing (the link shows how to override that 32-bit problem), see:
http://docs.oracle.com/cd/E56485_01/win.121/e55744/InstallConfig.htm#ODPNT8167
EF 6 is not yet supported by ODP.NET. See the release notes (README) for more info. EF6 will be supported shortly.
Edit: EF6 is now supported.
Sorry, I missed part of your question.
If you are using Visual Studio 2013, you must download Oracle Developer Tools for Visual Studio version 12.1.0.1.2 or later. With any older version, it will not be able to integrate with VS 2013.
Here is the download location:
http://www.oracle.com/technetwork/topics/dotnet/utilsoft-086879.html
EF 6.0 is not supported yet but you can use EF5 providers in VS 2013. So my other answer is not really relevant.
Entity Framework 6 Code First
ODAC 12c R3 is the first ODP.NET release to certify with Entity
Framework (EF) 6 and EF Code First. EF Code First is a popular
development model for .NET object-relational mapping. Developers
define the application domain model using source code, rather than
with a designer or an XML-based configuration file. An EF Code First
model's classes are defined in code through Plain Old CLR Objects
(POCOs).
...
These features are all available in both managed and unmanaged
ODP.NET.
http://cshay.blogspot.com/2014/09/odac-12c-release-3-beta-now-available.html

Quick deployment of Visual Studio 2010 app with SQL database

I am new to Visual Studio 2010, so please bear with me. Back in the days of using VB6 combined with an Access database, all I had to do was to use the Package & Deployment wizard and include the database file in the setup. Then all the client had to do was run one setup file and the application would magically run right away (the database would be placed in the App Path).
Is there some way to create a setup file in VS 2010 which will also install SQL Server Express automatically, attach the database along with the application itself?
This is meant for people who do not have SQL server installed and they should be able to start using the app by running one single setup.
Thanks!
Yes, your setup based on Windows Installer and built with Visual Studio itself can deploy everything you need. Read this article on MSDN for more details (maybe you won't need ClickOnce but it contains a lot of links).
I guess you need some clarification about your options (I assume you want to use a Microsoft solution because you talked about SQLExpress).
Microsoft SQL Server: fully featured database engine. It costs (a lot) and deployment isn't easy as we would.
Microsoft SQL Server Express: free edition (with some limits) of the big brother. Same installation issues. Perfect for medium desktop or web applications.
Microsoft LocalDB: single or multiple file, single user, support for stored procedures and advanced data types as in higher versions, easy to deploy and (optionally) per-user execution. Perfect for small/medium desktop applications and developing (with some preconditions with web applications too).
Microsoft SQL Server Compact 4.0: single file, single user, small, in-process, very easy to deploy. Perfect for small single user applications or used as local data storage (VS2k10 C++ Intellisense, for example, uses a SQLCE DB).
Microsoft JET Engine: the old beloved Access. If you come from VB6 I guess you know this.
If (and this is a big IF) your application is intended for a single user and you don't need data-sharing, now Microsoft provides a new version of SQLServer Express called LocalDB.
This version runs as standalone executable (isn't a service).
Its major advantage is the easy installation.
Search for LocalDB or look at my question LocalDB deployment

Connecting to a remote Oracle Database from Visual Studio

How do I connect to an Oracle Database that is not hosted on my loacal machine from visual studio. There seem to samy many different ways that I am getting confused. What kind of information would I need about the host machine and the database before I can proceed? Would I use ODBC or something else? Please help me out with this because I have spent weeks trawling the web and its very confusing.
You can use ODP.net which is Oracle's official middleware for .net applications.
Once installed, you can connect to a server by using one of the various connection mechanisms that Oracle supports: EZConnect, LDAP, TNSNames...
Once you can access the databases, you can use VS's server explorer to access the db objects

Resources