How to get data change notifications from SQL Express 2012? - delphi

We have client - server application, where client is built in Delphi XE4 and server uses SQL Server 2012 Express edition. Can my delphi application (using WMI for server events) receive data change notifications from Express edition?
The documentation says that Express edition supports service broker as "Client Only".
Is it possible to achieve the above functionality using Express edition with out the help of any other sql server edition in between.

Yes, you can. Query Notifications and SQLDependency are fully functional in Express editions. Working with Query Notifications explains how to use Query Notifications directly from OleDB (via SSPROP_QP_NOTIFICATION_TIMEOUT, SSPROP_QP_NOTIFICATION_MSGTEXT and SSPROP_QP_NOTIFICATION_OPTIONS) and from ODBC (via SQL_SOPT_SS_QUERYNOTIFICATION_TIMEOUT, SQL_SOPT_SS_QUERYNOTIFICATION_MSGTEXT and SQL_SOPT_SS_QUERYNOTIFICATION_OPTIONS). I don't know if Delphi exposes Query Notifications at higher level or you would have to code against low level ODBC or OLEDB. The really usable options are exposed via managed driver in C# et all, via SQLDependency class.
I see in the link MartynA posted the XE8 supports Query Notifications. It should work with Express.
The 'client only' restriction for Express refers strictly to Service Broker remote communications (exchanging messages between SQL Server instances), a capability not needed for Query Notifications.

You cannot use this feature with only Express edition.
You need at least Standard Edition to get the SQL Server Service Broker backend up and running. Once you have one Standard editon instance other Express edition instances can participate.

Related

.Net MVC Server to Server communications

I need to do some simple comms between two sites, including the case where the same website acts as both the client and server.
The client needs to call a server function with signature something like:
complexObject GetData( int, string)
I'm on c#, .Net MVC 4.5 and running on Windows 7 for dev and & Server 2008 for hosting. I'm looking at both Websockets and SignalR, but can't decide on suitability (I don't need javsacript support, it's purely client/server). There also seems to be limitations running Websockets below Windows server 2012, and on combining client & server in the same app/website ( I could remove that requirement if its a serious issue).
Any advice on the right way to go would be great.
You cannot use WebSocket in ASP.NET unless you are using Internet Information Server 8, so you would need Windows 8 or Windows 2012 server.
SignalR will fallback to SSE, ForeverFrame or LongPolling if you are not using IIS8. SSE is unidirectional from server to client, and does not work in IE.
You can host a WebSocket component in a worker role, that runs in the same domain but in different port. Running in the same domain, the WS connection will send the cookie during the HTTP negotiation, but you would have to work out how to associate the user identity.
You can use for example:
XSocket.NET: http://xsockets.net/
SuperSocket: http://superwebsocket.codeplex.com/
That said, you can still use other technologies for communicating from server to server, like a duplex WCF channel.
A Beginner's Guide to Duplex WCF
Duplex Service in WCF
Cheers.

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.

LDAP-Server implementation with Delphi

Does anyone have information on developing a LDAP server in Delphi?
I have a multi-function printing device that needs to authenticate a user over LDAP. There are a set of rules that should be checked before the approval can be given to the user to print.
These rules need to be implemented server side, so that the printer ldap client can query the server for authorisation.
Project JEDI API Library has JwaWinLDAP unit.
There's open source project called LDAP Admin which's written in Delphi, it will help you to get started.
Look at this article Active Directory Service Interfaces, with ADSI service you can talk with LDAP.
You can import com library activeds.dll, and use it with Delphi.
The light-weight Ararat Synapse TCP/IP library (for Delphi and Free Pascal) includes LDAP client support.
As far as I know, there is no LDAP server implementation for Delphi. Even commercial libraries like IP*Works! only contain LDAP clients.
If you need a native Windows LDAP server, which is compact and does not require the full Microsoft Windows Server license, maybe ADAM / AD LDS is an option. It is available from Microsoft for Windows 7 here. (all Microsoft Server editions include Active Directory Services, supporting LDAP, Kerberos and other standards).
I dont know about LDAP with Delphi but I found these:
- Delphi LDAP Support by Christopher Burke
- Delphi LDAP Authentication Component

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

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.

Differences between Exchange 2003 Web Services and Exchange 2007 web services

We have Exchange integration into our CRM (diaries and email); we have done this through CRL functions in our SQL 2008 server which handle all the authentication and communication with Exchange 2007 web services. The CLR then presents the functions to developers in SQL Server as regular functions and stored procedures which makes coding wit them simple. We are handling our synching through SSIS to sync the data up.
Unfortunately i cant just install exchange 2003 onto our network Our sales team are in the middle of negotiating a sale that will require me to back migrate the code to work on Exchange 2003. When i am looking to back-port the interface what are the main functional differences between the exchange 2003 and exchange 2007 web services?
What are any potential pitfalls i might face ?
Thanks :)
There are no EWS for Exchange 2003.
EWS were introduced in Exchange 2007.
Exchange Web Services - What You Didn't Know – Exchange Team Blog … (2009-03-25)

Resources