Wednesday, March 31, 2010

Advantage 10 Beta Now Available

ADS10_Beta  I have been discussing the many new features included in version 10 in the Advantage Pure and Simple Webcast Series. I have also been posting a series of screencasts demonstrating the various features of Advantage. These demos are all available on the DevZone under screencasts. Now you can download and test the latest version of Advantage. Just click on the image to register for the download.

Here is a quick list of the many new features and improvements included in Version 10.

  • Unicode
  • Nested Transactions
  • Transaction-Free tables
  • EventIDs
  • Express Queue Support
  • Table Data Caching
  • Temporary Table Caching
  • Boolean SQL Expressions
  • Query Execution Plan Improvements
  • Limiting Query Results
  • ROWNUM Support
  • SQL Bitwise Operators
  • SQL Timeout Property
    • More Expression Engine Functions
    • Advanced Delphi Property Editors
    • New Delphi Methods
    • New Delphi Component for Notifications
    • Automatically Configured Worker Thread Count
    • Binary Indexes
    • More 64-bit Clients
    • Support for Vulcan.NET
    • Side-by-Side Server Installations
    • New Help File Format
    • Many Performance Improvements

    You can get all the details on these features by reading the Advantage 10 Beta help file.

    Friday, March 26, 2010

    Version 10 Advantage Data Architect

    ARCTitle This week's Advantage Version 10 demonstration discusses the various improvements in Advantage Data Architect (ARC). This demonstration highlights the following:

    • Control the font size in grids
    • DBF Deleted record display
    • Improved SQL execution plan
    • Protocol setting in management utility
    • Unicode support throughout

    In this short ( ~5 minute ) screencast you will see all of these improvements.

    You can view the screencast by clicking on the image or download it in WMV format here. You can find all the Version 10 demonstrations on the DevZone under screencasts.

    Wednesday, March 24, 2010

    Advantage Pure and Simple | Productivity

    Tomorrow is the second in a three part series on Advantage version 10. You will have two opportunities to view the presentation and ask questions live. The first webcast is at 10AM EST and the second will be at 2PM EST. The description for tomorrow's webcast is below:

    Advantage Database Server 10 | Pure and Simple

    Over the past 15 years, the Advantage Database Server has become the heart of many data management applications with millions of deployments worldwide. Spring of 2010 will be significant for Advantage developers and users alike. Advantage Database Server 10 will be unveiled featuring key performance and usability enhancement and progression enablement like never before. Join us for this 3-part webcast series taking a close look at how Advantage Database Server 10 can impact your business for the greater good, pure and simple.

    Webcast 2: Productivity

    Building on our core principle of listening to our customers, Advantage Database Server 10 includes popular productivity and feature enhancements to the Advantage technology you have grown to love. Advantage 10 makes building your application enjoyable and easier to meet your customers needs.

    You can register for the webcast using this link.

    Friday, March 19, 2010

    Version 10 SQL Functionality

    SQLTitleThis week's Advantage 10 demonstration discusses the many SQL functionality features that have been added. These include using the results of a stored procedure in a SELECT statement, bitwise operators, paging and several new scalar functions.

    This short screencast ( ~ 9 minutes ) will demonstrate new SQL functionality and features included in version 10.

    You can view the screencast by clicking on the image or you can get the screencast in WMV format using this link. You can find all the Version 10 demonstrations on the DevZone under screencasts.

    Wednesday, March 17, 2010

    Updated Advantage Web Site

    Sybase launched a redesign of the entire web site today. This means that the Advantage pages have a whole new look. I think you will find it easier to navigate around and get information about Advantage as well as other Sybase products. Below is a screenshot of the main Advantage page.

    New Advantage Web Site

    Your best source of information as a developer is still the Devzone, however, the new Advantage site will contain links to many screencasts, whitepapers and datasheets that you will find useful.

    As always, your feedback is welcome.

    Monday, March 15, 2010

    Advantage Version 10 Podcast

    I have been recording all of my latest screencasts and demos using Camtasia Studio 6 which has an option for rendering the presentations in iPhone/iPod Touch format.  So I decided to render the version 10 demos in this format along with the flash and WMV formats.

    To go along with the iPhone ( 480 X 320 m4v ) I have a podcast feed available on the DevZone. I have not submitted this feed to Apple yet so you cannot find it in the iTunes store. However, you can manually subscribe to the feed using the following steps:

    1. Launch iTunes
    2. In the Advanced menu, select Subscribe to Podcast
    3. Enter the following feed URL ( in the text box and click OK

    The feed currently contains two episodes, Unicode Demo and Transaction Demo. I'll be adding a new episode each week leading up to the release of Advantage 10.

    Friday, March 12, 2010

    Version 10 Transaction Processing

    TxnTitleThis week's Advantage 10 demonstration discusses the transaction processing system. We have improved the performance and added several new features to the transaction processing system. This demonstration highlights the new functionality added to the transaction processing system.

    This short screencast ( ~ 7 minutes ) will demonstrate excluding a table from a transaction and using nested transactions. The demonstration is performed in Advantage Data Architect and using a Delphi 2010 application.

    You can view the screencast by clicking on the image or you can get the screencast in WMV format using this link. You can find all the Version 10 demonstrations on the DevZone under screencasts.

    Wednesday, March 10, 2010

    Checking the Advantage Serial Number

    Advantage includes many system procedures which allow you to obtain management information from the Advantage Database Server. One of these functions sp_mgGetInstallInfo can be used to retrieve the serial number of the server itself. This can be used to ensure that your application is connecting to the correct Advantage server.

    For example you can store a Serial Number in the registry or configuration file. Then on startup your application makes a connection to the Advantage server and retrieves the serial number. You can then compare the two serial numbers to verify that you are connecting to the correct server. Perhaps the one that they have purchased from you as part of your software.

    The following C# example demonstrates obtaining the serial number and comparing it to a serial number that is stored in the application configuration file. It uses a connection component that should already be connected prior to calling the function. The serial number is stored in the second field returned by sp_mgGetInstallInfo.

    private bool CheckSN()
        string SerialNumber;  
        if ( cn.State != System.Data.ConnectionState.Open )
            return false;
        // Create a command
        AdsCommand cmd = cn.CreateCommand();
        cmd.CommandText = "EXECUTE PROCEDURE sp_MgGetInstallInfo()";
        AdsDataReader rdr = cmd.ExecuteReader();
        if ( rdr.Read() )
            SerialNumber = rdr.GetString( 1 );
            SerialNumber = "";
        if ( SerialNumber.CompareTo( Properties.Settings.Default.ValidSN ) != 0 )
            return false;
            return true;

    Although this approach is very effective it is relatively simple to get around. A smart user could find a way to modify the configuration file or registry setting. Therefore you could use encryption to protect the serial number and reduce the chance that a user could change the "valid" serial number.

    Visual Studio includes several built in cryptography libraries which make this process quite simple. First you need to add some functions to convert a string into a hash. The two functions below demonstrate using the MD5CryptoServiceProvider.

    private string ComputeHash( string sValue )
        byte[] tmpSource;
        byte[] tmpHash;
        //Create a byte array from source data
        tmpSource = ASCIIEncoding.ASCII.GetBytes( sValue );
        //Compute hash based on source data
        tmpHash = new MD5CryptoServiceProvider().ComputeHash( tmpSource );
        return ByteArrayToString( tmpHash );

    After that you simply read the serial number from the server, run it through the same hashing function and then compare the hashed values. The valid serial number would need to be stored in a hashed form when the application was installed. Or perhaps it could be done when the application first connects to Advantage.

    private bool CheckSN( String SN )
        string SerialNumber;
        if ( cn.State != System.Data.ConnectionState.Open )
            return false;
        // Create a command
        AdsCommand cmd = cn.CreateCommand();
        cmd.CommandText = "EXECUTE PROCEDURE sp_MgGetInstallInfo()";
        AdsDataReader rdr = cmd.ExecuteReader();
        if ( rdr.Read() )
            SerialNumber = rdr.GetString( 1 );
            return false;
        SerialNumber = ComputeHash( SerialNumber );
        if  ( SerialNumber.CompareTo( Properties.Settings.Default.HashedSN ) != 0 )
            return false;
            return true;

    I created a simple C# application that demonstrates these techniques which you can download from CodeCentral.

    Friday, March 5, 2010

    Version 10 Unicode Demo

    UnicodeTitle  With the Advantage Version 10 Beta fast approaching I will be publishing a series of short demonstrations of the new features and functionality available in version 10. The first demonstration is on Unicode. In this demonstration you will see how to manipulate Unicode data within an Advantage table. You can also see how to set collation sequences to ensure that the data is sorted correctly.

    This demo includes a brief introduction to Unicode and information about how it is implemented in Advantage. The bulk of the demonstration is actual manipulation of Unicode data from within ARC and in a Delphi 2010 application. Click on the image to view the demo.

    You can also download the demo in WMV format using this link. You can find all the Version 10 demonstrations on the DevZone under screencasts.

    Wednesday, March 3, 2010

    Upcoming Events

    The Advantage Technical Summit is now open for registration. This is a great opportunity to learn more about Advantage Database Server and get all the latest information about Version 10. The training will be conducted in Boise Idaho on April 28th and 29th. Sessions run from 8am – 5pm both days. We provide lunch and dinner for all attendees. You can get more information about the summit here.

    Sybase DevDays are a series of one day events held around the country. Each event will include a keynote, lunch and four Advantage specific sessions. Mike Hagman and I will be giving you an in-depth look at Version 10. The sessions include: an overview of version 10, demonstrations of the new features, a performance showcase and an interactive question and answer session. We will be visiting the following cities.

    General information and registration is available here.

    Monday, March 1, 2010

    FAQs – February 2010

    User Licenses and Replication

    Replication consumes a user license on each of the subscriber machines. If the subscriber has the maximum number of users connected then the replication will receive a 7003 error. Changes will continue to be added to the replication queue but they will not be sent to the subscriber(s) until the error is resolved.

    Advantage VCL Components not on Pallet

    After installing the Advantage Components they do not show up in Delphi 20xx. When using Delphi 2005 and newer you must install the Advantage Delphi Components and not the Advantage TDataSet Descendant. The TDataSet Descendant works with Delphi version 7 and older.

    Version of the Advantage Delphi Components supports Delphi 2010.

    Where Do I Put 32-bit Advantage DLLs on a 64-bit System

    Advantage clients load the Advantage DLLs from the system directory if they are not in the applications local path. This is true of the various development environments as well. The system path for Windows is C:\Windows\System32. This path is the same for both 32-bit and 64-bit versions of Windows.

    However, on a 64-bit version of Windows the System32 directory actually contains 64-bit DLLs. 32-bit DLLs need to be placed in the C:\Windows\SysWOW64 directory. This is the default system path for 32-bit applications which are running within the 32-bit emulator.

    DLL Caching

    By default the Advantage Database Server caches DLLs that are used for Advantage External Procedures (AEPs). This allows for dynamic updating of AEPs and backing up of the AEP DLLs. The cache setting is set in the data dictionary using the ADS_DD_DISABLE_DLL_CACHING property. This property is persisted even after you disconnect, for more information see the help file. You can change this property using the ACE API or using the sp_ModifyDatabase system procedure. Below is an example of using the system procedure to ensure DLL Caching is enabled.

    EXECUTE PROCEDURE sp_ModifyDatabase( 'DISABLE_DLL_CACHING', 'false' )

    When debugging AEPs you may want to turn off DLL caching to ensure that the latest version of you AEP is being used. However, if you ship your database with DLL caching disabled you will not be able to dynamically update AEP files. You may also get errors when backing up the database since the AEP DLL may be loaded by the server. With DLL caching enabled a copy of the AEP is loaded allowing you to copy or modify the original AEP file.