Friday, November 13, 2009

Madison PC Users Group

We visited the Madison PC Users Group meeting on Wednesday night. There was a good turnout at the meeting and we were able to discuss Advantage Database Server with them. I would like to thank Eric Selje of Salty Dog Solutions for getting us on the schedule. You can get his summary of the meeting here.

This meeting had a diverse mix of PC users and developers. We trimmed down our presentation to highlight the Advantage features and we did a lot more discussion of general database topics than usual. However, the group was very friendly and had many good questions during the presentation.

If your interested in the information that we presented to the Madison user group check out the Getting Started with Advantage screen cast we did earlier this month.

Wednesday, November 11, 2009

Chicago FoxPro User Group Meeting

Last night we presented at the Chicago FoxPro Users and Developers Group. We got a great turnout and the meeting lasted nearly three hours. There were many questions about replication and encryption during the meeting. It was great to have such an interactive group to present to.

We did take a short break during the meeting to have some authentic Chicago style pizza. Which made for a great break during the meeting.

With everyone energized after the pizza we finished up the meeting by showing some demonstrations of our CloneDBC utility and using Advantage from FoxPro. Again we had great interaction and good questions during the demos and we were able to discuss several use cases and scenarios.

All of the attendees received a flash drive which included all of the screen casts we have produced for FoxPro developers. You can view these screencasts all together using this link. Many other screen casts about Advantage are available on the Devzone.

We will be in Madison, WI tonight for another user group meeting.

Monday, November 9, 2009

Chicago FoxPro User Group

I will be presenting at the Chicago FoxPro Users and Developers Group on Tuesday night the 10th of November. We will be discussing using Advantage Database Server with FoxPro. If you are in the Chicago area feel free to drop in. THe meetings are held at Tech Nexus on the 15th floor of 200 S. Wacker Drive. The meeting runs from 5:30PM until 8:00PM.

View Larger Map

Here is the description from the Chicago FoxPro User Group Site

We have a couple of representatives of Sybase coming to Chicago to demonstrate their Fox-friendly data server -- Advantage; An alternative to pricey backends with an easy conversion route. It should be a good time -- another milestone in a long history of tech twists and turns. From their promotional material at * Flexible data access via either native relational SQL or direct navigational database commands. * Optimized data access for all development environments, including Delphi, Visual Studio, Visual Objects, Visual Basic and more. * Zero administration, easy to install and manage — does not require a database administrator, eliminating high administration costs. * Complete referential integrity support including primary/foreign key definition and cascaded updates and deletes. * Complete server-based transaction processing eliminates database corruption, drastically reducing support costs. * Database security and encryption support. * Fully scalable from local to peer-to-peer to client/server environments — with one set of source code If you have been wondering about a Fox friendly data backend that breaks the 2 GB barrier, come check out the Sybase presentation of Advantage Database Server. First meeting is free. From then on, $10 per meeting or $75 per year. The usual time and place: Tech Nexus 200 S. Wacker Drive, Suite 1500. Tuesday Nov. 10th at 5:30pm (chip in for Pizza and brown bottle beverage.) Here’s the RSVP link: As we have worked to keep the FoxPro Users and Developers group a vibrant and interesting colloqium over the years, we notice that new blood comes into the group based on one meeting or subject. I remember making contact with a future employer because he came to see what was up with Crystal Reports in 2002. See you there?

Monday, November 2, 2009

FAQs October 2009

DSN less connection

There are two ways to connect to an ODBC driver, using a Data Source Name (DSN) or by providing a connection string. The latter is generally referred to as a DSN Less connection. A DSN Less connection can be useful because there is no need to create a DSN on every system your application is running on.

A DSN connection string needs at least a Driver and a DataDirectory. When connecting to a data dictionary you will also have to specify a UID (Username) and PWD (Password). When working with free tables we recommend specifying the table type using the DefaultType keyword. See the example DSN connection strings below.

// Connection to an Advantage Data Dictionary
Driver=Advantage StreamlineSQL ODBC; DataDirectory=C:\Data\Demo\DemoDictionary.add; Uid=adsuser;Pwd=password;

// Connecting to a directory of Visual FoxPro tables
Driver=Advantage StreamlineSQL ODBC; DataDirectory=C:\Data\VFP ; DefaultType=FoxPro;

All of the properties for an ODBC connection are listed in the  help file 

Permissions Required for Modifying RI Rules

You cannot assign rights to Referential Integrity objects within the database. RI rules can only be created in the database by an administrator. Users with ALTER permissions on the tables involved in the RI rule can modify the rule. RI Rules are not visible in the dictionary without the proper permissions. RI rules are enforced for every database user there is no way to exclude users from an RI rule.

Using the AdsCommandBuilder

The Advantage .NET Data Provider includes a AdsCommandBuilder class which is responsible for creating SQL commands to update, insert and delete data for an AdsDataAdapter. Any statements that are not set directly on the AdsDataAdapter will be generated by the AdsCommandBuilder.

By default the command builder requires the table to have a primary key in order to generate the additional commands. Ideally you will have primary keys on all of the tables that you use within your application. In practice this is not always the case. If the table does not have a primary key assigned you must set the RequirePrimaryKey property to false.

The following code demonstrates using the command builder to generate INSERT, UPDATE and DELETE commands for a given AdsDataAdapter.

oCommand.CommandText = "SELECT * FROM Customer"
daTemp = New AdsDataAdapter(oCommand)
dtTemp = New DataTable()
' build the INSERT, UPDATE and DELETE commands
cbAds = New AdsCommandBuilder(daTemp)
cbADS.RequirePrimaryKey = False    ' Primary key not available on the table
daTemp.InsertCommand = cbAds.GetInsertCommand()
daTemp.UpdateCommand = cbAds.GetUpdateCommand()
daTemp.DeleteCommand = cbAds.GetDeleteCommand()

Error 7156

The 7156 "Auto Index Rebuild Active" error appears in the error log it most likely occurred because the server was stopped abnormally. For performance reasons indexes are stored in cache and written to disk as necessary. If the Advantage service is stopped abnormally it is possible that all of the index updates have not been written to the index file.

To correct this situation the Advantage server will automatically rebuild any indexes that it had in cache prior to the cache. This will ensure that the indexes are proper and up to date. It will lock the tables while the index is being rebuilt so you may need to wait a few minutes before connecting clients after restarting a server that has crashed.