I need a database login dialog to appear when Stonefield Query Studio connects to my database. How can I do that?
Add DispLogins=2 to a [Settings] section in SFQEditor.INI (if that file doesn't exist, create it):
I need to define more than one relationship between a pair of tables. How do I do that?
You have to create a subtable for the parent table in the relationship. See the Creating a Subtable topic for details.
I have a table of employees that includes a MANAGER_ID field. This field contains the ID for another employee record representing this employee's manager. How do I set this up in Stonefield Query so a user can print the names of employees and their managers?
This type of relationship is called a self-join. Like multiple relationships between tables, you have to create a subtable and then define a relationship between the "main" table and the subtable.
After creating a data dictionary for an application's database on my system, how do I tell Stonefield Query to work with databases on my users' systems, which are in different locations than the one I'm using.
There are two ways you can do this:
If you're using ODBC and you want the user to select the data source via a DSN on their system, set the User Can Manage Data Sources configuration property to True. The advantage of this approach is that you don't have to know anything about the data source, such as the server, database name, user name, password, or even which database engine it uses (such as SQL Server vs. Oracle). The downside is that the user has to know how to create a DSN.
You can programmatically define the data sources to use for a database by creating a GetDataSources script for it. This approach is completely transparent to the user but requires that you have complete information about the data source (driver, server, database name, user name, and password) or can read it programmatically from somewhere at runtime.
I use the PhdBase library to perform fuzzy searching on my Visual FoxPro tables. How can I tell Stonefield Query to load this library?
Add a [Libraries] section to the SFQuery.INI file for your project and list the PhdBase FLL file in this section. See the Stonefield Query Project Files and Specifying Libraries to Load topics for details.
I've created a version of Stonefield Query that accesses a Pervasive (formerly known as Btrieve) database. However, when I start Stonefield Query, I get the following error:
The reason for this error is that the Pervasive engine does not support connections made with a connection string ("DSN-less connections"); instead, a DSN must be specified. Stonefield Query uses DSN-less connections unless you set the User Can Manage Data Sources configuration property to True and the Use DSNless Connection property to False, and select a DSN from page 2 of the Setup dialog or from the Manage Databases dialog (see the Stonefield Query help file for information on these dialogs).
I've created a version of Stonefield Query that accesses an Adaptive Server Anywhere database. However, when I start Stonefield Query, I'm getting the following error: Integrated logins are not permitted.
The cause of the problem is the same as the previous one: Adapter Server Anywhere does not support connections made with a DSN-less connection.
I've changed the password for my SQL Server account. How do I tell Stonefield Query Studio about this change so the Refresh button works correctly?
Select the database node in the TreeView and change the connections settings.
I am getting "garbage" output in reports. I'm using the IBM iSeries DB2 ODBC driver.
The "garbage" characters are actually binary data. Be sure to configure your DSN to convert binary data to text on the Translation page of the ODBC setup dialog.
I'm using the Microsoft SQL Server ODBC driver and can't access any of the data types added in SQL Server 2008, such as Date.
You need to use the SQL Server Native Client driver rather than the SQL Server driver.
I'm adding a MySQL database to my project and getting an error when it hits one particular table. What can I do about that?
This error seems to occur in the MySQL ODBC driver for certain table names (we haven't figured out the cause). The workaround is to add a NoNative section to SFQuery.INI and list the tables you want Stonefield Query to handle differently. For example:
[NoNative] table1=Customers table2=Orders
Some of my users are getting timeout errors with the database. What can I do to resolve that?
Add the following to the Application.BeforeSetup script (create that script if it doesn't already exist):
sqlsetprop(0, 'ConnectTimeOut', 120)
In place of "120," substitute the number of seconds that work to prevent the timeout.
© Stonefield Software Inc., 2018 • Updated: 06/06/16
Comment or report problem with topic