What Is Direct Mode and Why Would I Use It?

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
djb
Posts: 8
Joined: Fri 24 Mar 2006 23:26

What Is Direct Mode and Why Would I Use It?

Post by djb » Wed 03 Dec 2014 16:17

What is 'Direct Mode', and why would I use it instead of the SQL Native Client drivers?

Thanks

azyk
Devart Team
Posts: 1057
Joined: Fri 11 Apr 2014 11:47
Location: Alpha Centauri A

Re: What Is Direct Mode and Why Would I Use It?

Post by azyk » Wed 03 Dec 2014 16:59

Direct Mode in SDAC was developed for opportunity to support SQL Server in client applications not only on Windows platforms, but on Android, iOS, MAC OS X platforms as well.

An article about using Direct mode in SDAC can be found in our online documentation: http://www.devart.com/sdac/docs/index.h ... t_mode.htm

A sample of using mobile application development is in the SDAC project. The SDAC project is in the "Demos\Mobile\DelphiXX\" folder relatively to the SDAC projects installation path.

If after reading the article and investigation of the demo project you have any more questions, please ask - we will answer them.

djb
Posts: 8
Joined: Fri 24 Mar 2006 23:26

Re: What Is Direct Mode and Why Would I Use It?

Post by djb » Wed 03 Dec 2014 17:39

I see the limitations in the documentation.

I assume Direct Mode is an access method supported by Microsoft, but I have not found any documentation on it. Is there any MS documentation you can point me to?

Thanks

azyk
Devart Team
Posts: 1057
Joined: Fri 11 Apr 2014 11:47
Location: Alpha Centauri A

Re: What Is Direct Mode and Why Would I Use It?

Post by azyk » Thu 04 Dec 2014 10:57

SDAC uses TCP/IP to connect to SQL Server in the Direct mode.
Please clarify: what exact limitations in the documentation do you mean?

djb
Posts: 8
Joined: Fri 24 Mar 2006 23:26

Re: What Is Direct Mode and Why Would I Use It?

Post by djb » Thu 04 Dec 2014 17:50

SDAC uses TCP/IP to connect to SQL Server in the Direct mode.
I understand that. So can the SQL Native Client, OLEDB and ODBC. I've never seen any Microsoft documentation for how to connect directly via TCP/IP without using one of the aforementioned connection APIs, so I'm curious where this method is documented by Microsoft.

I can see the benefit of direct mode in mobile applications (although I would use web services instead), and the only benefit I see for desktop applications is to eliminate the requirement for updated SQL drivers on the client machine. This could be useful, but before going down this path I'd like to know more.

Can you please point me to any Microsoft documentation that discusses this mode of connection?
Please clarify: what exact limitations in the documentation do you mean?
As per the documentation:

Direct mode limitations

•Connection using TCP/IP protocol only
•Certain problems may occur when using firewalls.
•Table-Valued Parameters are not supported
•SQL Server cursors are not supported
•Windows Authentication is not supported

I'm also assuming that direct mode does not support mirroring, is that correct?

azyk
Devart Team
Posts: 1057
Joined: Fri 11 Apr 2014 11:47
Location: Alpha Centauri A

Re: What Is Direct Mode and Why Would I Use It?

Post by azyk » Thu 11 Dec 2014 12:00

djb wrote:I understand that. So can the SQL Native Client, OLEDB and ODBC. I've never seen any Microsoft documentation for how to connect directly via TCP/IP
SDAC supports connection to SQL Server via TCP/IP in the Direct mode in the same way as SQL Native Client, OLEDB and ODBC providers, and it doesn't use the libraries at this.

Such limitations as Table-Valued Parameters and SQL Server cursors should be considered as being developed for the Direct mode and that they will be available in the next SDAC versions. If you meant Failover Partner by the "mirroring" functionality, then its implementation is in progress as well.

Post Reply