TIP # 1

This is the body of an e-mail that I posted to the topspeed forum some months back
that describes how to set things up to get at Access97 tables from inside Clarion

1) go into the 32-bit ODBC administrator (in Control Panel on Windows 95
or NT) and declare a System DSN data source (EX. Data97).  Make sure
that the Database area lists the full path name of the Access 97
database file you are trying to work with.

2) in the Clarion Dictionary, put in a file.  In the file properties
set it to ODBC driver type.  In Owner's Name put the name of the System
DSN Data source (ex. Data97).  In the Full Path name put the name of the
table from inside the Access 97 database that you want to work with when
you use this file handle (if the database has BadUsers and GoodUsers,
you put the appropriate table name in the Full Path name)

3) watch variable names very closely.  If your variable names don't
match exactly - your clarion file definition calls it  UsersName and the
Access 97 database calls it Users Name (notice the space between the
words) - you have to go into the ATTRIBUTES tab of the UsersName
variable and provide an external name of Users Name for Clarion to
understand what is happening when accessing this database.

4) make sure your application is compiling in 32-bit.  I would also
recommend setting the run-time library to LOCAL to be sure you've got
all the drivers necessary internal to the EXE itself (to avoid sticky
path-problems).

5) make sure you've got all the indexes covered that the Access 97
tables contain.

6) if you have trouble, do what I did.  Construct a very simple
database.  One Table in one file.  1 column of data with a single key
and see how it works.  Once you've got the basics working, start adding
columns and keys until it matches what you want.

7) an error that I have seen sporadically is on that tells you that a field can't have a null value on an insert.  This seems to be a problem within Access 97.  I have worked around this by specifying that a field should have a value of ' ' (a single space) or a 0
on inserting.  Pain in the neck to have to explicitly do this, but it does work

TIP # 2
  How to set up to import Access table definitions into a clarion dictionary

  1) check the contents of \windows\system (\winnt\system on an NT workstation) directory on your PC and look for any files that match the following:
	odbcadm.exe
	ctl3dv2.dll
	odbc.dll
	odbccurs.dll
	odbcinst.dll
	odbcinst.hlp
  Backup any file that matches the name to be safe

  2) copy the the above files to \windows\system (or \winnt\system if on an NT workstation)
  3) reboot the computer
  4) describe the data source that you want to import from in the 32-bit ODBC administrator.
  5) go into a clarion dictionary and do an import file, chose an ODBC type and the computer will give you a 16 or 32 bit option window.  pick the data source you want and import it.
	
	that's it.  What Clarion seems to need is this version 2.1 of the ODBC administrator present so it has someone to talk to.  You (at least I) can set up 32-bit ODBC data sources with the 32-bit administrator that comes standard in Windows 95 and Windows NT.  The version 2.1 of the administrator can see these and that seems to be enough.  It isn't necessary to set up data sources in version 2.1, it can read what the version 3.1 32-bit administrator has and that is enough to work with.

	Although I use this with Access files, I think it is the missing link to make a lot of ODBC imports work properly for other data-file types
