Why doesn't Microsoft support OLE DB connections to SQL Azure? - delphi

At the MSDN website it says, "Connecting to SQL Azure by using OLE DB is not supported."
There are other places on the web where folks report that it works fine for them after tweaking the server name in the connection string, such as here and here. Even SQL Server's Analysis Services uses OLE DB to connect to SQL Azure!
I develop a native/unmanaged application in Delphi that connects to SQL Server using ADO through the OLE DB provider for SQL Server. I'm considering adding SQL Azure support. It would be really helpful if I could reuse the majority of my code without not too much change. I probably wouldn't consider going this direction otherwise.
It would be helpful if Microsoft were more clear on why "OLE DB is not supported". If there are certain limitations within the use of OLE DB, what are they? Maybe I can work around them, or maybe it wouldn't affect me.
Microsoft also mentions that ODBC is supported. So could I use the "OLE DB provider to ODBC" and connect this way? Or is any combination that includes OLE DB "not supported"?

You can use it, however it has not been thoroughly tested for all cases. Essentially, it should work for most things, but there might be a few edge cases where it won't work. Until we document those cases, it remains unsupported. That being said, if you were to use and run into errors, we would love to know about it and prioritize that to be fixed.

Vote for the OleDB support for Azure here:
http://www.mygreatwindowsazureidea.com/forums/34685-sql-azure-feature-voting/suggestions/407269-ole-db-provider-for-connecting-to-sql-azure?ref=title

You can use ADO using the SQL Native Client although this information is hard to find you can read about it here http://msdn.microsoft.com/en-us/library/ms130978(SQL.110).aspx and here http://msdn.microsoft.com/en-us/library/ms131035(SQL.110).aspx.
In the connection string instead of using Provider=SQLOLEDB; we can use Provider=SQLNCLI10;. Also it is recommended to use DataTypeCompatibility=80;. So a SQL Native Client supported connection string would look like this:
"Provider=SQLNCLI10;Server=tcp:MyServerName.database.windows.net;Database=AdventureWorks2008R2;Uid=MyUserName#MyServerName;Pwd=MyPa$$w0rd;Encrypt=Yes;DataTypeCompatibility=80;"
You can also add "MARS Connection=True;" to the connection string for multiple recordsets.

Related

Connecing to MapR database from Delphi/C++Builder app

I'm trying to find out if there is something like FireDac or dbExpress to connect an application written in Delphi or C++ Builder to a MapR Database. I was able to find this page that describes how to connect to various databases including Teradata, but there is no mention of MapR.If anyone has done this, I would really appreciate any pointers you might be able to give me.
FireDAC does not natively support MapR nor does dbExpress.
Your options seem to be:
Use MapR's REST Api - see REST or just google
mapr rest api
Use ODBC access. There is one available here: HiveODBC.

How do I create a Dart Server database?

I know that it is possible to create a IndexedDb at client side, but I was wondering if it possible to create a key/value store server Side. In that case we could use that db as a cache server or even as an elasticSearch server, or maybe replace a SQL or NoSQL database
Unfortunately it is not possible to create an IndexedDb on the server in Dart. The implementation primarily leverages the APIs provided by the client-side navigator (eg. Chrome, Firefox, etc). IndexedDb is a developing web standard which will hopefully be implemented in all browsers in the future. In this way, Dart is basically using APIs to access a separate database (albeit a very simple one). It is not implemented in Dart itself.
That said, in addition to other serverside database APIs, there is also a Dart client interface for memcache which can be run on the sever to connect to a memcache instance
You can use any database on the server where a Dart driver is available (not so many yet, but in the future there will be support for most mainstream databases.
take a look at
https://pub.dartlang.org/packages/yomp_db
http://pub.dartlang.org/packages/mongo_dart
http://pub.dartlang.org/packages/sqljocky

ADO retrievable data service?

Need pointers on how to make a data provider/service ADO-compatible. This requirement is quite similar to how we use classic ado to query an LDAP server (active directory). Here is an e.g. of the same --> http://www.4guysfromrolla.com/webtech/041800-1.shtm
However the stuff I am expecting this provider would do is, actually talk to a WCF service underneath, and somehow generate a recordset for downstream consumption.
If you're looking to make the data you are extracting available via an ADO interface, you might take a look at the article here - its a bit dated, but I suspect the basic concepts are still valid.
ADO Providers

Let me know that how can i connect to sql server in monodroid without creating web service.

Let me know that how can i connect to sql server in monodroid without creating web service.
Mono for Android includes the System.Data.dll assembly, which includes System.Data.SqlClient namespace support (just like MonoTouch does). To use Mono for Android's System.Data.SqlClient implementation you'll need to enable TDS support on your SQL Server instance; see also my handy Microsoft SQL Server Setup guide for connecting to SQL Server from Mono's System.Data.SqlClient implementation (some of which may be useful to you).
If you find an open-source type 4 JDBC (I here jTDS does this, though I have not personal experience) driver for SQL Server it shouldn't be too difficult to port to Android; you'll still hit problems on many devices, though, for cell network providers aren't always good about allowing traffic to "unusual" ports from cell devices.

Entity Framework 4 and SQL Server App Roles - How to Work Together?

I’m researching EF4 for a new in-house application development project using .NET v4, EF4, & SQL Server 2008 R2. To date, our small dev team has done very little .NET development and only demonstration EF applications. Our current applications use DB app-roles for security and that's worked out well for us.
From reading and some basic experimentation, my understanding is:
EF can open and close DB connections as needed. However it is possible to manually open and close an EntityConnection for use by the EF ObjectContext.
SQL Server app-role security requires running sp_setapprole on DB connections to set the application role context. sp_unsetapprole can be used to revert a connection to its original context.
By default, DB connections are pooled. Using sp_setapprole with connection pooling can be problematic if the connections are not restored to their original context before being returned to the pool.
If all the above is correct then the obvious way to use EF4 with app-roles is to manually open & close the EntityConnection, being sure to execute sp_setapprole after opening and sp_unsetapprole before closing.
Is there a better way? I'm mostly concerned about accidentally closing the connection without first calling sp_unsetapprole. Seems like an error that may not be noticed immediately.
You can just add "Pooling=false;" to your store connection in the app.config (Provider Connection String). If you don't actually need pooling, this seems to be the simplest solution.

Resources