SQL Server Data Access Components Frequently Asked Questions

Installation and Deployment

I am having a problem installing SDAC or compiling SDAC-based projects...

You may be having a compatibility issue that shows up in one or more of the following forms:

  • Get a "Setup has detected already installed DAC packages which are incompatible with current version" message during SDAC installation.
  • Get a "Procedure entry point ... not found in ... " message when starting IDE.
  • Get a "Unit ... was compiled with a different version of ..." message on compilation.

You can have such problems if you installed incompatible SDAC, ODAC, MyDAC, IBDAC, or UniDAC versions. All these products use common base packages. The easiest way to avoid the problem is to uninstall all installed DAC products and then download from our site and install the last builds.

What software should be installed on the client computer so that my applications that use SDAC can run?

SDAC requires OLE DB installed on the workstation. In current versions of Microsoft Windows, such as Windows 2000, OLE DB is already included as part of the standard installation. But it is highly recommended to download the latest version (newer than 2.5) of Microsoft Data Access Components (MDAC).
Core Lab renaming issue that conserns Delphi for .Net users
  • Please remove all CoreLab assamblies references from your project and add corresponding Devart ones
  • Please change all unit references in uses clauses from CoreLab to Devart (you can use standard renaming tool)

Licensing and Subscriptions

Am I entitled to distribute applications written with SDAC?

If you have purchased a full version of SDAC, you are entitled to distribute pre-compiled programs created with its use. You are not entitled to propagate any components inherited from SDAC or using SDAC source code. For more information see the License.rtf file in your SDAC installation directory.

Can I create components using SDAC?

You can create your own components, inherited from SDAC or using the source code of SDAC. You are entitled to sell and distribute compiled application executables that use such components, but not their source code and not the components themselves.

In order to compile components inherited from SDAC, you will need the SDAC dcp runtime package, which can be received upon request by registered users

What licensing changes can I expect with SDAC 4.00?

The basic SDAC license agreement will remain the same. With SDAC 4.00, the SDAC Edition Matrix will be reorganized and a new SDAC Subscription Program will be introduced.

What do the SDAC 4.00 Edition Levels correspond to?

SDAC 4.00 will come in three editions: Standard Edition, Professional Edition, and Trial Edition. SDAC Professional Edition can be acquired with Source Code.

When you upgrade to the new version, your edition level will be automatically updated using the following Edition Correspondence Table.

Edition Correspondence Table for Upgrading to SDAC 4.00
Old Edition Level New Edition Level
- No Correspondence - SDAC Standard Edition
SDAC Standard Edition SDAC Professional Edition
SDAC Professional Edition SDAC Professional Edition with Sources
SDAC Trial Edition SDAC Trial Edition

The feature list for each edition can be found at the SDAC editions page.

I have a registered version of SDAC. Will I need to pay to upgrade to future versions?

After SDAC 4.00, all upgrades to future versions are free to users with an active SDAC Subscription.

Users that have a registration for versions of SDAC prior to SDAC 4.00 will have to first upgrade to SDAC 4.00 to jump in on the Subscription program.

What are the benefits of the SDAC Subscription Program?

The SDAC Subscription Program is an annual maintenance and support service for SDAC users.

Users with a valid SDAC Subscription get the following benefits:

  • Access to new versions of SDAC when they are released
  • Access to all SDAC updates and bug fixes
  • Product support through the SDAC Priority Support program
  • Notification of new product versions

Priority Support is an advanced product support program which offers you expedited individual assistance with SDAC-related questions from the SDAC developers themselves. Priority Support is carried out over email and has a two business day response policy.

The SDAC Subscription Program is available for registered users of SDAC 4.00 and higher.

Can I use my version of SDAC after my Subscription expires?

Yes, you can. SDAC version licenses are perpetual.

I want a SDAC Subscription! How can I get one?

An annual SDAC Subscription is included when ordering or upgrading to any registered (non-Trial) edition of SDAC 4.00 or higher.

You can renew your SDAC Subscription on the SDAC Ordering Page. For more information, please contact sales@devart.com.

Does this mean that if I upgrade to SDAC 4 from SDAC 3, I'll get an annual SDAC Subscription for free?


How do I upgrade to SDAC 4.00?

To upgrade to SDAC 4.00, you can get a Version Update from the SDAC Ordering Page. For more information, please contact sales@devart.com.


How productive is SDAC?

SDAC uses the lowest documented protocol level (OLE DB) to access the database server. This allows SDAC to achieve high performance. From time to time we compare SDAC with other products, and SDAC always takes first place.

Why does the Locate function work so slowly the first time I use it?

Locate is performed on the client. So if you had set FetchAll to False when opening your dataset, cached only some of the rows on the client, and then invoked Locate, SDAC will have to fetch all the remaining rows from the server before performing the operation. On subsequent calls, Locate should work much faster.

If the Locate method keeps working slowly on subsequent calls or you are working with FetchAll=True, try the following. Perform local sorting by a field that is used in the Locate method. Just assign corresponding field name to the IndexFieldNames property.

How To

How can I enable syntax highlighting in SDAC component editors at design time?

To enable syntax highlighting for SDAC, you should download and install the freeware SynEdit component set.

How can I determine which version of SDAC I am using?

You can determine your SDAC version number in several ways:

  • During installation of SDAC, consult the SDAC Installer screen.
  • After installation, see the history file in your SDAC installation directiory.
  • At design-time, select SQL Server | About SDAC from the main menu of your IDE.
  • At run-time, check the value of the SdacVersion and DACVersion constants.

How can I stop the cursor from changing to an hour glass during query execution?

Just set the DBAccess.ChangeCursor variable to False anywhere in your program. The cursor will stop changing after this command is executed.

How can I execute a query saved in the SQLInsert, SQLUpdate, SQLDelete, or SQLRefresh properties of a SDAC dataset?

The values of these properties are templates for query statements, and they cannot be manually executed. Usually there is no need to fill these properties because the text of the query is generated automatically.

In special cases, you can set these properties to perform more complicated processing during a query. These properties are automatically processed by SDAC during the execution of the Post, Delete, or RefreshRecord methods, and are used to construct the query to the server. Their values can contain parameters with names of fields in the underlying data source, which will be later replaced by appropriate data values.

For example, you can use the SQLInsert template to insert a row into a query instance as follows.

  1. Fill the SQLInsert property with the parametrized query template you want to use.
  2. Call Insert.
  3. Initialize field values of the row to insert.
  4. Call Post.

The value of the SQLInsert property will then be used by SDAC to perform the last step.

Setting these properties is optional and allows you to automatically execute additional SQL statements, add calls to stored procedures and functions, check input parameters, and/or store comments during query execution. If these properties are not set, the SDAC dataset object will generate the query itself using the appropriate insert, update, delete, or refresh record syntax.

How can I get a list of the databases on the server?

Use the TMSConnection.GetDatabaseNames method.

How can I get a list of the tables list in a database?

Use the TMSConnection.GetTableNames method.

Some questions about the visual part of SDAC

The following questions usually arise from the same problem:

  • I set the Debug property to True but nothing happens!
  • While executing a query, the screen cursor does not change to an hour-glass.
  • Even if I have LoginPromp set to True, the connect dialog does not appear.

To fix this problem, you should add the SdacVcl unit to the uses clause of your project.

General Questions

I would like to develop an application that works with SQL Server. Should I use SDAC or DbxSda?

DbxSda is our dbExpress driver for SQL Server. dbExpress technology serves for providing a more or less uniform way to access different servers (SQL Server, MySQL, Oracle and so on). It is based on drivers that include server-specific features. Like any universal tool, in many specialized cases dbExpress providers lose some functionality. For example, the dbExpress design-time is quite poor and cannot be expanded.

SDAC is a specialized set of components for SQL Server, which has advanced server-specific design-time and a component interface similar to that of BDE.

We tried to include maximal support of SQL Server-specific features in both DbxSda and SDAC. However, the nature of dbExpress technology has some insurmountable restrictions. For example, Unicode fields cannot be passed from a driver to dbExpress.

SDAC and DbxSda use the same kernel and thus have similar performance. In some cases dbExpress is slower because data undergoes additional conversion to correspond to dbExpress standards.

To summarise, if it is important for you to be able to quickly adapt your application to a database server other than SQL Server, it is probably better to use DbxSda. In other cases, especially when migrating from BDE or ADO, you should use SDAC.

What are the advantages of SDAC over Delphi ADO components for accessing SQL Server?

ADO is a universal data access technology, while SDAC is specialized for Microsoft SQL Server, so SDAC includes many server-specific features which ADO components do not implement. SDAC has much better performance (5-10 times in different tests) because it works directly through OLE DB. Moreover, SDAC has advanced design-time support.

Behaviour of my application has changed when I upgraded SDAC. How can I restore the old behaviour with the new version?

We always try to keep SDAC compatible with previous versions, but sometimes we have to change behaviour of SDAC in order to enhance its functionality, or avoid bugs. If either of changes is undesirable for your application, and you want to save the old behaviour, please refer to the "Compatibility with previous versions" topic in SDAC help. This topic describes such changes, and how to revert to the old SDAC behaviour.

On connect I get error "OLE DB error occured. Code 800401F0h. CoInitialize has not been called." What can I do?

As SDAC uses OLE DB, before a new connection is established it is necessary to initialize OLE by calling CoInitialize. In common case VCL does it automatically. SDAC does not call to the CoInitialize and CoUninitialize functions itself as it may cause unexpected problems if OLE is used in the program by someone else.

Are the SDAC connection components thread-safe?

Yes, SDAC is thread-safe, but there is a restriction. The same TMSConnection object cannot be used in several threads at the same time. So if you have a multithreaded application, you should have a TMSConnection object for each thread that uses SDAC.

When editing a DataSet, I get an exception with the message 'Update failed. Found %d records.' or 'Refresh failed. Found %d records.'

This error occurs when the database server is unable to determine which record to modify or delete. In other words, there are either more than one record or no records that suit the UPDATE criteria. Such situation can happen when you omit the unique field in a SELECT statement (TCustomDADataSet.SQL) or when another user modifies the table simultaneously. This exception can be suppressed. Refer to TCustomDADataSet.Options topic in SDAC help for more information.

Some questions with using TCustomDADataSet.FetchAll=False mode

Common issues when using FetchAll=False:

  • I have problems working with temporary tables.
  • I have problems working with transactions.
  • Sometimes my application hangs on applying changes to database.

Usage of FetchAll=False mode has many advantages; however, it also has some restrictions since it requires an additional connection to server to be created for data fetching. The additional connection is created to prevent the main connection from blocking.

These problems can be avoided by setting the FetchAll property to True. Please see description of the FetchAll propery and the CreateConnection option in SDAC help for more information.

One more way to solve these problems is to use the Multiple Active Result Sets (MARS) feature. This feature lets you keep more than one unfetched record set within a single connection. To enable MARS, set the MultipleActiveResultSets option of TMSConnection to True. Note: To use MARS, you will need to have SQL Server 2005 and SQL Native Client installed.