Access databases are stored in a .mdb file. Using the ODBC manager, create an ODBC data source and map it to one of these files. A new .mdb file can be created through the ODBC manager. This database file becomes the default if you don't specify a different default when you create a table through SQL Anywhere.
Assuming an ODBC data source named access, you can use any of the following statements to access data:
CREATE TABLE tab1 (a int, b char(10)) AT 'access...tab1'; |
CREATE TABLE tab1 (a int, b char(10)) AT 'access;d:\pcdb\data.mdb;;tab1'; |
CREATE EXISTING TABLE tab1 AT 'access;d:\pcdb\data.mdb;;tab1'; |
Access does not support the owner name qualification; leave it empty.
| SQL Anywhere data type | Microsoft Access default data type |
|---|---|
| BIT, TINYINT | TINYINT |
| SMALLINT | SMALLINT |
| INT, INTEGER | INTEGER |
| BIGINT | DECIMAL(19,0) |
| DECIMAL(p,s), NUMERIC(p,s) | DECIMAL(p,s) |
| DATE, TIME, DATETIME, TIMESTAMP | DATETIME |
| MONEY, SMALLMONEY | MONEY |
| FLOAT | FLOAT |
| REAL | REAL |
| CHAR(n), VARCHAR(n) |
CHARACTER(n) if n is less than 254 TEXT if n is greater than or equal to 254 |
| LONG VARCHAR | TEXT |
| BINARY, VARBINARY |
BINARY(n) if n is less than 4000 IMAGE if n is greater than or equal to 4000 |
| LONG BINARY | IMAGE |
| Send feedback about this page via email or DocCommentXchange | Copyright © 2008, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.0 |