OLE DB provider for ADO.NET data source - ado.net

I have an application which can connect to OLE DB data sources, however, my proprietary database has only ADO.NET provider.
Is there any ADO.NET to OLE DB bridge which could helps me to connect to ADO.NET data source?
EDIT:
I do not have control on application. It is some kind of reporting service. Here is how I expect to connect:
App <-> OLE DB Provider <-> (bridge?) <-> ADO.NET Data Source
Everything is running on Windows machine

You didn't mention the platform so I am going to assume things and point you to some direction.
For the .NET Framework Data Provider for OLE DB, the connection string
format is identical to the connection string format used in ADO
For more details you can refer to this page to get started:
Connecting to an OLE DB Data Source Using ADO.NET
And also it wouldn't hurt to have a look at this title Connecting to an OLE DB Data Source
in the following MSDN article (.NET 4.5)
Establishing the Connection
Update
On the other hand to access a ADO.NET data source using an OLE DB you can follow this example.
However if you mean by the word "bridge" to have something like
using (SqlConnection connection = new SqlConnection(oleConnectionString))
where, oleConnectionString is an originally an OLE connection string which is converted to act as an SQL connection string?! I am not sure if that's possible.
ADO.NET Sample

Related

Can you use DBeaver without connecting to a database?

I would like to develop a ER diagram using DBeaver (Eclipse plugin) for a database that doesn't yet exist. Also, the database server doesn't exist.
Can DBeaver be used to develop a ER diagram without connecting to an existing database server? I can only find documentation for working with an existing database or connecting to an existing database server.
Nope, sorry.
DBeaver tools are always associated with the current connection.
For example, in the ERD when adding tables, DBeaver often sends requests to the database of foreign keys.
You can use standard sample SQLite database in DBeaver for experiments.

I am having trouble creating DB in SQL Server Express with Entity Framework Core 2.0

I am going through the MvcMusicStore tutorial on the www.asp.net website.
I am able to use Entity Framework Core 2.0 and migrations to create a DB in localDb.
Here is the connection string from that in appsettings.json:
"MvcMovieContext": "Server=(localdb)\\mssqllocaldb;Database=MvcMovieContext-19840e0a-5fb4-409c-9f38-7f2946cd3937;Trusted_Connection=True;MultipleActiveResultSets=true",
When ever I do these tutorials I usually at this point once the DB is created and everything works switch to SQL Server Express, because this is how I actually develop my projects.
So Entity Framework checks the new connection string, doesn't see the DB exists, and creates the new DB based on the Model.
But I can't seem to get the connection string to SQL Express working.
Here is what I have tried so far:
"MvcMovieContext": "Server=MyComputerName\\SQLEXPRESS;Database=MvcMovie;Trusted_Connection=True;MultipleActiveResultSets=true"
and
"MvcMovieContext": "Data Source=.\\SQLEXPRESS;Initial Catalog=MvcMovie;Integrated Security=True;MultipleActiveResultSets=true"
Both give the same result. The dreaded message:
SqlException: Cannot open database "MvcMovie" requested by the login. The login failed.
Login failed for user 'Domain\smiller'.
I installed SQL Server Express in Mixed Mode so Windows Authentication works and I made my 'Domain\smiller' account a DbCreater in Server Roles.
Just can't seem to get it.
I needed to run:
Update-Database
I went through this last year:
Why is dotnet ef not able to create a database against SQL Server Express?
It seems I never learn.

Connecting to local SQL Server ASP.Net Core Entity Framework from Excel 2016

I am working with Visual Studio 2017 and have an MVC app that uses Entity Framework that creates a local SQL Server database for the Entity stuff.
What I am trying to do is to connect to that database from Excel.
I have the connection string form the database, but can't seem to get Excel to create an ADODB connection to it. I am getting a Run-time error '-2147217887 (80040e21): Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done. It is failing on the cn.Open below. Any help would be appreciated.
Dim cn As New ADODB.Connection
strCon = "Data Source=(localdb)\MSSQLLocalDB;Initial Catalog=PropertyValContext-57e4e5c8-9272-493b-ab16-74faf5d4318f;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=True;ApplicationIntent=ReadWrite;MultiSubnetFailover=False"
cn.Open strCon

Crystal Reports against OLAP / XMLA / SimbaO2X-server

I'm trying to convert some old Excel-reports to Crystal Reports. The excel sheets uses OLAP-cubes and connects to a database using a XMLA connection over a SimbaO2X driver.
I just can't figure out which connection settings to use in Crystal Reports to be able to connect to the database.
I've tried both XML and OLAP connections, but just can't get a database connection.
Any help with the connection setting would be appreciated!
Edit: The database is a bit of a black box; it's probably an Oracle database (it was an Oracle database before the end user frontend was rewritten in java. They could have changed the database as well.) I have however no success with neither the Oracle Server nor the Microsoft OLE DB for Oracle connection method.
I have also this morning found a SimbaO2X provider under the OLE DB folder. While not working it's the best so far -- it accepts the username and password and lets me select which database to connect to but then fails with ADO Error Code: 0x80040e73 (Format of the initialization string does not conform to the OLE DB specification.) At least I have something to go on.
I'm running Crystal Reports XI if someone needs to know.
Partial solution:
Upgrade Crystal Reports XI to Release 2, service pack 4.
Update from service pack 4 to service pack 6.
Upgrades and updates can be downloaded from the SAP Community Network
A connection can now be made with the SimbaO2X OLE DB driver. This solution should also resolve connection problems with some other databases as well.
However, adding a table to the report results in a 0x800a0cc1 error (Item cannot be found in the collection corresponding to the requested name or ordinal)

What is difference in adodb and oledb?

What is the difference between adodb and oledb?
What is the relation between these two?
Where does ado.net stands in context of adodb and oledb?
Adodb (ActiveX Data Objects DB) is an API layer over OLE DB. It works well with MS-based databases such as Sql Server, providing a consistent API and optimizations. That being said you can use ADODB to connect with non-MS data sources as well but that would mean that you will require an OLEDB/ODBC Provider for the data source.
In simpler terms, to connect to any data source you need a driver. Here are a couple of common scenarios to think of:
ADODB for Data Source that has ODBC Driver Only - ADODB uses OLEDB Provider for ODBC which loads ODBC Driver which then connects to Data Source.
ADODB for Data Source with OLEDB Driver (like SQL Server) - ADODB uses OLEDB Provider for SQL Server to talk directly with DB.
Oledb (Object Linking and Embedding DB) is a standard format supported by a large number of dbs, so you can connect to oracle, db2 etc. using Oledb. You can also use OLEDB directly to connect to Sql Server but the API is messier as compared to a adodb connection which is optimized to work with Sql Server and MS Access.
ADO.Net is a .Net based db connection "architecture". In ADO.Net there's a library for Oledb - System.Data.OledbClient. Adodb has been replaced/upgraded and ADO.Net now uses the System.Data.SqlClient library for MS-based databases/data providers.
ADO is a COM-based library for accessing databases.
OleDB and ODBC are standards for communicating with databases.
ADO uses the OleDB to talk to any database that exposes an OleDB driver.
There is also an OleDB driver that can wrap any ODBC driver. Thus ADO can also talk to any database that exposes an ODBC driver.
ADO.NET (a.k.a. System.Data) is a .NET based library for accessing databases.
ADO.NET has built-in support for SQL Server, OleDB, and ODBC
Third parties can expose their database to ADO.NET by building a ADO.NET compatible library
Third parties can also expose their database to ADO.NET by offering an OleDB or ODBC driver