Ahh... wondered if you'd pick up on those issues.
The SQL you use for ODBC is *generally* cross-database safe - that is, if you use ANSI-standard SQL.
However, many databases, like Access, use non-standard syntax. Which is the problem you have come across ;-)
The actual tests for the ODBC module are assuming an ODBC connection to a MySQL database.
So, they'd need to be "tweaked" to work on Access.
To create the auto incrementing column in my example, I used:
I guess, "counter" is the important bit. Remember, this won't work for say, MySQL.
(In Access,) To insert into a table where one field is auto-incrementing, you need to leave out the field as part of the insert. In MySQL you can pass Null. In Postgres, I think you've to pass 0. (Well, it's 0 in Oracle...)
Thus, to insert into person, the easiest way is to show what fields you intend inserting into :
Which would cause the missing "id" field to be populated with the "next" value in its sequence.
I suggest you try reading the Access syntax documentation. Alas, as I've discovered, it's close to the worst documentation I've read when trying to find something specific. (it took me about 20 mins to find out I had to use "counter" for an auto-incrementing column).
I suggest you look at the access example to get an idea of the difference between the SQL Access needs and what MySQL requires.
btw, the reason I didn't do *all* the tests in Access, is because I haven't the time to work it out myself... since my Win32 time is relegated to the work PC.
:o)
The SQL you use for ODBC is *generally* cross-database safe - that is, if you use ANSI-standard SQL.
However, many databases, like Access, use non-standard syntax. Which is the problem you have come across ;-)
The actual tests for the ODBC module are assuming an ODBC connection to a MySQL database.
So, they'd need to be "tweaked" to work on Access.
To create the auto incrementing column in my example, I used:
id counter constraint pk primary key
I guess, "counter" is the important bit. Remember, this won't work for say, MySQL.
(In Access,) To insert into a table where one field is auto-incrementing, you need to leave out the field as part of the insert. In MySQL you can pass Null. In Postgres, I think you've to pass 0. (Well, it's 0 in Oracle...)
Thus, to insert into person, the easiest way is to show what fields you intend inserting into :
INSERT INTO person ( forename, surname ) VALUES ('brucey', 'bonus');
Which would cause the missing "id" field to be populated with the "next" value in its sequence.
I suggest you try reading the Access syntax documentation. Alas, as I've discovered, it's close to the worst documentation I've read when trying to find something specific. (it took me about 20 mins to find out I had to use "counter" for an auto-incrementing column).
I suggest you look at the access example to get an idea of the difference between the SQL Access needs and what MySQL requires.
btw, the reason I didn't do *all* the tests in Access, is because I haven't the time to work it out myself... since my Win32 time is relegated to the work PC.
:o)