SDAC

Frequently Asked Questions

This page contains a list of Frequently Asked Questions for SQL Server Data Access Components.

If you have encounter a question with using SDAC, please browse through this list first. If this page does not answer your question, refer to the Getting Support topic in SDAC help.

 

Installation and Deployment
  1. 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 or IBDAC 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.

  2. 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).

    Many features of SQL Server like Query Notifications, MARS require Microsoft SQL Server Native Client. If you need to use these features, you should download and install Microsoft SQL Server Native Client.

    For applications that use SQL Server Compact Edition, the server itself is required to be installed on the client computer.

    For more information, please refer to the Deployment topic of the SDAC help.

Licensing and Subscriptions
  1. 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.

  2. Can I create components using SDAC?

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

  3. 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.

  4. What do the SDAC 4.00 Edition Levels correspond to?

    SDAC 4.00 will come in four editions: Trial, Standard, Professional, and Professional with Sources.

    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 LevelNew Edition Level
    - No Correspondence -SDAC Standard Edition
    SDAC Standard EditionSDAC Professional Edition
    SDAC Professional EditionSDAC Professional Edition with Sources
    SDAC Trial Edition SDAC Trial Edition

    The feature list for each edition can be found in the SDAC documentation and on the SDAC website.

  5. 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.

  6. 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.

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

    Yes, you can. SDAC version licenses are perpetual.

  8. 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 [email protected].

  9. Does this mean that if I upgrade to SDAC 4 from SDAC 3, I'll get an annual SDAC Subscription for free?
    Yes.
  10. 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 [email protected].

Performance
  1. 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.

  2. 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
  1. 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.

  2. How can I determine which version of SDAC am I 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.html 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.
  3. 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.

  4. 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.

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

    Use the TCustomDAConnection.GetDatabaseNames method.

  6. How can I get a list of the tables list in a database?
    Use the TCustomDAConnection.GetTableNames method.
  7. 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
  1. 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.

  2. What are the advantages of SDAC over Delphi ADO components for accessing SQL Server?
    ADO is a universal components while SDAC is specialized in SQL Server, so SDAC takes into account lots of server specific features. SDAC has great benefit in performance (5-10 times in different tests) because it works directly through OLE DB, which is a native SQL Server interface. Moreover, SDAC provides advanced design-time editors.
  3. 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.

  4. On connect, I get an "OLE DB error occured. Code 800401F0h. CoInitialize has not been called" error. What can I do?
    As SDAC uses OLE DB, it is necessary to initialize OLE by calling CoInitialize before a new connection is established. Usually VCL does this automatically. SDAC does not call to the CoInitialize and CoUninitialize functions itself, as this may cause unexpected problems if OLE is used in the program by someone else.
  5. Are the SDAC connection components thread-safe?

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

  6. 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.

  7. 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 and SQL Native Client installed.

© 1997-2024 Devart. All Rights Reserved. Request Support DAC Forum Provide Feedback