Part of Database drivers: the hub. 89 entries under this heading; every entry opens as its own topic.
- SQL Server Express: the app connects on the LAN but not from outside - named instance vs fixed port, the quoted
"address,port"owner string, the firewall. - SQL Server: the MSSQL driver or the ODBC driver? - portability vs server features, what changes when switching.
- SQL Server Express 2008: Management Studio connects, the app gets "90 File System Error:: 8001 Named pipes provider" (Reported, not reproduced) - the
tcp:/np:protocol prefix in the owner string, TCP/IP and the Browser service. - MSSQL: "Connection is busy with results for another hstmt (S1000)" on random tables - PROP:BusyHandling, set before the first OPEN.
- A long-running stored procedure blocks every other query - a connection per thread with BUSYHANDLING.
- The owner string is a global variable: where in the program is it assigned? - Program Setup, before the first OPEN.
- Oracle: how to write the owner string for the Oracle native driver -
user/password@SID_Server, the!variableform, TNSPING first. - Installing the 32-bit Oracle ODBC driver on 64-bit Windows - Instant Client first, SysWOW64 administrator, NLS_LANG.
- PostgreSQL: IM002 "data source name not found" on a new install - psqlODBC is a separate install; listen_addresses and pg_hba.conf.
- Pervasive: a DSN-less owner string fails with "you attempted a dsn less connection" - the driver prefixes
dbq=; put the database name first. - An ODBC driver that works in Access and Excel is not seen by the Clarion dictionary - Windows registers ODBC drivers, not Clarion; use the DSN.
- MySQL via ODBC: "Could not determine the driver name so could not lookup setup library (HY000)" - a broken MyODBC build in 2005; today a DSN whose driver name does not match.
- MySQL 4.0 via MyODBC: Error 2 "File Not Found" when the tables are first opened -
/VERIFYVIASELECT=TRUE; never let a "not found" become a CREATE. - InterSystems Cache: how to connect a Clarion table through the ODBC driver - the dictionary settings for the Cache DSN.
- SQL Server Compact Edition: can a Clarion application use it instead of SQL Express? - no ODBC driver for Compact; historical, SQLite is the fit today.
- Connecting a Clarion program to an Advantage Database Server (local and remote connection strings) - one ODBC owner string per server type, DataDirectory pointing at the data dictionary.
- Listing the MS SQL servers on a network from a Clarion program - nothing native; Windows API code (Microsoft KB 287737), a posted project showed the servers.
- MySQL via MyODBC: "You have an error in your SQL syntax" on a one-field table (Reported, not reproduced) - run the Trace utility and post the generated SQL; the server version was not the cause.
- Importing a MySQL table through ODBC fails, or the table arrives with no fields (Reported, not reproduced) - BLOB and date-time columns were the suspects; the same structure imported in a C7 dictionary.
- ODBC access to an Advantage database that has no data dictionary: setting up the DSN and importing the tables - install the vendor driver, use the 32-bit ODBC administrator, import the tables from the DSN.
- PostgreSQL with Clarion: 32-bit or 64-bit ODBC driver? - the 32-bit psqlODBC driver, even against a 64-bit server.
- MSSQL: after Cancel on the login window a second SQL login window appears - add /LOGONSCREEN=FALSE to the driver options of every table; the second window comes from another table.
- Overriding the /TRUSTEDCONNECTION driver option at run time before connecting to MSSQL - declare the tables with the driver options and the owner as global variables, built before the first OPEN.
- Importing Paradox table definitions through the MS Paradox ODBC driver gives the table name and no fields (Reported, not reproduced) - other posters saw Paradox imports work on Clarion 5 and fail on 5.5; no fix was found.
- Oracle Instant Client ODBC driver: ODBC Administrator crashes when creating a DSN, and the Clarion app crashes opening a table - replace Instant Client 10.2 with 11.2; the DSN could then be created.
- PostgreSQL: log shows "No connection could be made because the target machine actively refused it" when a new browse opens (Reported, not reproduced) - the thread offered an address range, a timeout and the server log as leads; no cause was found.
- MSSQL encrypted columns: Clarion shows the encrypted data although Management Studio shows plain text (Reported, not reproduced) - the thread points to an ODBC 13 driver with
ColumnEncryption=Enabledin the driver string; the steps are in another newsgroup, and EncryptByPassPhrase in the SQL was the other route. - PostgreSQL ODBC driver installed but not visible in the ODBC Data Source Administrator on Windows 7 - the driver is on the Drivers tab, not among the data sources; the 32-bit driver list is in
C:\Windows\SysWOW64\ODBCAD32.EXE. - MS SQL: switching the application to another database at run time (one database per fiscal year) - put a variable in the OWNER attribute, close every open table, then assign the new connection string; PROP:Disconnect also worked.
- FM3 "Unable to interpret SQL structure": Invalid object name 'SYS.COLUMNS' (S0002) - read as a permission problem on the sys.columns view for the login; the poster fixed it by removing and reinstalling the dev server update.
- SQL Server not reachable at start-up: error 08001, then a MESSAGE or STOP locks up the program - a MESSAGE or STOP wrote to the MessageBox log, which was a SQL table, with the server down; use a plain error window and RETURN.
- ODBC: Prop:Disconnect in the CloseWindow embed gives an access violation in some apps and not in others - do not disconnect in the CloseWindow embed; put Prop:Disconnect in the Window Kill embed at priority 7300 or higher, after the files are closed.
- ODBC: the dictionary cannot browse or convert a SQL table, the IDE freezes or the generated project cannot load odbc.dll - the IDE still needs the old 16-bit odbc.dll (53,200 bytes, dated 1993) where it can find it; browse and convert then worked.
- ODBC: Sage 50 data, switching between companies without editing the DSN - use a DSN-less connection string in a global variable named in the Owner Name (
!GLO:ConnectionString), built before the first ODBC table opens. - ODBC to an Access .mdb works as an exe but stalls when the exe runs as a service - a service cannot see mapped drives; use a full UNC path in the connection and the ODBC connection worked.
- PostgreSQL through ODBC: can one app use several databases at the same time (Common, Financial, one per company)? - yes, give each file the connection string of its database in the owner variable; use one string and a database.schema.table name when joins across areas are needed.
- MSSQL: "Login failed for user 'Servername\Guest'" after moving an app from SQL 2008 to a SQL 2012 server - do not combine TrustedConnection with SQL authentication; use ServerName\InstanceName with a user and password, and set the global connection string very early.
- Can the Clarion native MSSQL driver use MS SQL Express 64-bit? - yes, any 64-bit Express release; the client machines still need a 32-bit ODBC driver.
- MySQL through ODBC: "unable to find odbc 3.51 driver" although the 3.51 driver is installed (Reported, not reproduced) - the posters answered the connection settings (server name, account, privileges) rather than the message, and one described taking the connect string from a working imported table; no cause was found.
- Firebird / Interbase through ODBC: the dictionary import hangs with the open source ODBC driver (Reported, not reproduced) - no poster named the cause; one saw beta 2 of the driver work "almost fine", slowly, with decimals imported as PDECIMAL or DECIMAL.
- PostgreSQL ODBC: what goes in the Server box for a LAN server, and "Could not connect to the server; connect failed for [address:5432]" - put the IP address or name of the machine running the engine in the Server entry, then check port 5432, the firewall and that PostgreSQL accepts remote connections.
- Changing a dictionary from MS SQL to PostgreSQL: the ODBC driver, the connect string, and the schema trap - use the ODBC driver with a PostgreSQL connect string whose driver name matches the ODBC administrator exactly, and mind the schemas.
- MSSQL: an application running as a Windows service with SQL Server on Windows Authentication - which account? - a poster ran such a service with an administrator account (not LocalSystem) over TCP/IP; on different hardware give it a domain account with rights on the SQL Server.
- MSSQL driver: "File access error: specified SQL server not found. (08001)" on a few clients only (Reported, not reproduced) - ping, subnet, firewall and port 1433 were all fine; enabling the guest account and the domain and DNS checks were asked about; no cause was posted.
- MSDE: which ports must be open besides 1344 for full database communication? - the default install used TCP 1433; a named instance also needs UDP 1434, which worked for the poster.
- Excel through ODBC: "Syntax error in FROM clause (37000)" when a browse loads a sheet (Reported, not reproduced) - the error comes from the Excel driver answering the SQL Clarion generated; read it in a driver trace; sheets act as separate tables; no fix was posted.
- MySQL over ODBC on a remote server: constant "file not open" errors, "MySQL server has gone away (08S01)" - test for errorcode 90 with FILEERRORCODE() of '08S01' before database access and retry the OPEN.
- PostgreSQL: is a session opened per table or per application, and is it harmful to allow 500 or 1,000? - a session is a connection; Clarion reuses one while the connection string stays identical, so the count follows the connection strings, not the tables.
- PostgreSQL: dictionary import brings in tables without fields or keys (Reported, not reproduced) - use Synchronize rather than importing each table; the poster said it failed and then worked, without saying what changed.
- Pervasive table imported through ODBC: the dictionary browse crashes and the app reports error 47 (Reported, not reproduced) - a second poster got the same and stopped using the ODBC import for Pervasive; the Pervasive Control Center reached the file but did not answer how to connect the Clarion app; no cause was found.
- ODBC to PostgreSQL: the app prompts for a data source although the Owner string is set - check that the variable you fill is the one the Owner names (the poster had filled a look-alike global); for a DSN put only
DSN=mydsn; a DSN-less string with the driver name works too. - PostgreSQL: cannot connect to the local server after changing the security software - suspect the firewall or the security suite and open the PostgreSQL port; try turning SSL off, psql on the command line, and check pg_hba.conf.
- MSSQL driver: how to switch the connection string to Windows authentication - remove the user id and password, keep
Server,databasefirst and add;Trusted_Connection=YES;with the trailing semicolon; further ODBC key-value pairs follow the same way. - MySQL via ODBC: "no datasource found" when the program runs from a mapped network drive on another computer - create the data source on every machine, with the ODBC 3.51 driver, the server's IP number and the same name everywhere; the poster found this himself.
- ODBC: making the ODBC connection at run time when a new user has no data source yet - leave the owner empty and the driver asks - declare the file with an OWNER attribute that names an empty string variable; on OPEN the driver asks the user for the data source; the poster did not report back.
- MySQL: importing a table into the dictionary fails with "Invalid Field Type descriptor" (Reported, not reproduced) - the tinyblob columns were suspected and changing them to blob did not help; a SoftVelocity poster imported the same table without trouble; the cause was never named.
- Firebird: a DSN-less connection string would not open the table (DBANAME instead of DBNAME) - spell the keyword DBNAME; back slashes in the database file name were also suggested, and the poster reported only the keyword change.
- PostgreSQL over ODBC: "record was changed by another station" only on rows converted from TPS (add LFConversion=0) - Rows converted from TPS gave "record changed by another station" on update; adding LFConversion=0 to the ODBC connection string fixed it for the poster.
- Reading AS/400 files from Clarion: the Client Access ODBC driver; the other direction is open - Read AS/400 files directly through the ODBC driver that comes with Client Access; for the AS/400 reaching PC files, one poster suggested a NetTalk web server.
- MySQL: "the MySQL database has gone away" after the application sits idle or the laptop sleeps - Raise the server's wait_timeout, run a keep-alive query every 30 seconds, or retry the OPEN when error 90 with FILEERRORCODE 08S01 appears; a keep-alive query did not survive laptop hibernation.
- SQL Server 2000 over a direct IP connection and a 48 Kbps dial-up line: a minute to connect, minutes between procedures - Over a slow remote line cut client-server traffic: filter or limit browses, move work to views and stored procedures, load queues; do not compare with ASP.
- ODBC to Access without a DSN: putting the connection string in a variable on the table's OWNER - Put a full ODBC connection string for the Access driver in a variable on the table's Owner, fill it before the OPEN, and no DSN is needed.
- QODBC (QuickBooks) over ODBC: the connection seems to be lost between calls and the driver window pops up each time (Reported, not reproduced) - A QODBC session seemed to restart on every call; one poster suspected two LOGOUTs make Clarion open a second connection; no outcome posted.
- MySQL tables imported through ODBC give "right truncation (01004)" in a browse (Reported, not reproduced) - Right truncation on imported MySQL tables was read as a type mismatch (char/varchar, decimals, nchar, BYTE); keys need not match indexes; no outcome posted.
- PostgreSQL over ODBC: a browse leaves a cursor open for hours or days and VACUUM never completes (Reported, not reproduced) - A page-access browse keeps a cursor open and blocks VACUUM; a timer, PROP:Disconnect or a read-only cursor were suggested; no outcome posted.
- MS SQL over a VPN: "table can not be opened ... network error" while Btrieve and TPS apps work (Reported, not reproduced) - An MS SQL app failed over a VPN while Btrieve and TPS worked; ping, the dbnetlib library, bandwidth and a query trace were suggested, with no cause posted.
- Report Writer (RW) cannot reach a SQL Server database: it is 16-bit, and the posters advised Crystal Reports - Report Writer is 16-bit and suits ISAM files; for SQL Server or MySQL data the posters advised using Crystal Reports instead.
- Synchronizing a dictionary with MySQL: the DMC clone script fails with "No database selected" (Reported, not reproduced) - Cloning a TPS table to MySQL with the Data Management Center failed with "No database selected" although the ODBC test passed; no outcome was posted.
- MySQL via ODBC: "Access denied for user ... (Using password: YES)" although the user and password are right - MySQL rejects the user because accounts are tied to a host; check the host column in the user table, then GRANT for that host and FLUSH PRIVILEGES.
- PostgreSQL from Clarion without ODBC: is there a native driver? - In 2007 there was no native PostgreSQL driver; use an ODBC driver, or write your own interface against the PostgreSQL client library.
- ODBC: how to see the connection string the driver actually uses (Pervasive example) - Neither trace showed the string; a third-party ODBC tracing tool did, or build it from a DSN or File DSN and paste it into the table Owner.
- MS SQL: the Microsoft SQL driver or ODBC, and which SQL Server driver version to name in the owner string - Name the driver that matches the server in the owner string; posters advised Native Client 10 for SQL 2008 and saw no benefit in the accelerator over ODBC.
- MySQL ODBC 3.51 driver versus ODBC 5: any speed difference, and DSN or no DSN? - Two posters saw no speed difference between the MySQL ODBC 3.51 and 5 drivers and preferred DSN-less connections as easier to set in code.
- MSSQL: connecting to a new, empty database without a table to open (a utility that creates the structures) - Open a dummy file on a system table, or use TURBOSQL on the master database; the poster used CREATE() on a one-field table, then PROP:SQL.
- MSSQL on 64-bit Windows 7: a multi-DLL app hangs when the connection is made in the data DLL (use the server's IP address) - A multi-DLL app hung connecting from Windows 7 64-bit with login timeout S1T00; using the server's IP address instead of its name cured it.
- MSSQL driver options that stop the "busy" errors: BUSYHANDLING=2 on every table, including dummy files - Set BUSYHANDLING=2 on every table including dummy PROP:SQL files, leave MARS and fixed retry counts out; a service still blocked at two sites.
- NexusDB through ODBC: the table imports, then the app reports an invalid record declaration and no index imports (Reported, not reproduced) - A NexusDB table imported through ODBC gave an invalid record declaration and no indexes; the Synchronizer and a Clarion 5.5 import were suggested, with no outcome posted.
- SQL Server 2005 Express: the ODBC data source is refused with "remote connection" or "does not exist or access denied" - An ODBC data source to SQL Server 2005 Express was refused until Local and Remote connections were enabled in the Surface Area Configuration tool; also check TCP/IP, the port and the firewall.
- Reading an .SDF file (a Pocket PC SQL Server CE database) from Clarion - An .SDF from a Pocket PC is a SQL Server CE database; the one route offered was a third-party tunnel tool that lets the desktop query the device.
- Testing whether a SQL database is available before opening a table - Test the open with TryOpen before the generated open files code, set /LOGONSCREEN=FALSE on each file, and skip the generated error and HALT path.
- Firebird through ODBC over TCP/IP: what to put in the DSN as the database name - Name the remote Firebird database as servername:drive:\path\file.fdb with the path as the server sees it, or define an alias in aliases.conf and use servername:alias.
- Firebird through ODBC over an ADSL line is very slow: a tunnel was suggested - Remote Firebird over ADSL was very slow; a tunnel (openssh/putty or zebedee) that encrypts and compresses was suggested, with the DSN pointed at localhost.
- MS Access through ODBC: "File not found (2)" on a table with an underscore in its name - it was a typo - File not found error 2 on an Access table with an underscore ended as a typo in the poster's project; underscores in table and file names worked for another poster on Clarion 6.
- PostgreSQL ODBC: an access violation after about 500 repeats of the same code in a new thread (Reported, not reproduced) - An access violation after about 500 repeats stayed unsolved; the driver name changed between ODBC driver versions 8.04.01 and 8.04.02, which explained one connection-string difference.
- SQL Server: "File dbo.PM10100 could not be opened. Error: General error: invalid window handle (S1000)" on a client PC - S1000 invalid window handle on open was caused, in the poster's case, by the application calling a non-existent DLL; ports, firewall, credentials and ODBC driver were the first checks suggested.
- MS SQL through ODBC without a DSN: the owner string for a remote server, the port, and the client alias - A DSN-less ODBC string for a remote SQL Server uses the TCP/IP network library; name the port in the string or add a client alias in the Client Network Utility.
- Creating tables from the dictionary on SQL Express fails with "Driver Error (1):(10) ODBC.DLL could not be started" (Reported, not reproduced) - Creating tables from the dictionary on SQL Express gave an ODBC.DLL could not be started error; posters suggested a blank database first, a checked owner string, or an import.
- Excel through the ODBC driver: a file made by the driver can be read, but a file made in Excel cannot (Reported, not reproduced) - An Excel-made file would not read through the ODBC driver; posters suggested named ranges, the sheet name followed by a dollar sign, and quoted column names; no outcome.
- Converting a large TPS application to MS SQL: procedures disappear when the dictionary changes - keep one dictionary and change the driver - Keep the original dictionary and just change its driver; a new dictionary needs a TXA without idents; set BusyHandling before connecting; wrap dates in a group.