Tips: ODBC & Access database

Tips on using ODBC with Microsoft Access

provided by: 
Originally published at Internet.com


1. MS Access drivers (upto and including Access 97) are not thread safe.

2. Always make user your DoFieldExchange order is the same as the order of fields in the DB table. The class wizzard will occasionally change the order at you.

3. Don't use 16-bit Ints in your database. Only use Bytes or Longs (32-bit). The RFX_Short function actually uses SQL_LONG in the ODBC call. Most of the time this seems to work OK, but it will fail for paramaters. Also remember VC++ 5.0 ints are 32-bits.

4. Don't try and bind to fields you are passing in as paramaters. I.E. In the Access Query if you have a field you are compairing to a paramater, make sure the show row is not check for that column.

5. You can have Indexes with multiple fields besides the primary key to help speed up the DB, and help with Database integerity. To do this go into design view for the table, and select View->Indexes. at the bottom of the list enter a new index name, and then enter the names of the fields you wish to have in the index in the Field name colum in the next rows, leaveing index name cell blank Index Name    Field Name   Sort Order UserName      LastName     Accending               FirstName    Accending               MiddleInit   Accending Index2        Field1       Accending               Field2       Accending Index3        Field1       Accedning Index4        Field1       Accending ...

Read article at Internet.com site
Related Articles
- Visual Basic .NET Attributes
Attributes are classes that allow individual developers to extend VS.NET tools without rebuilding VS.NET each time. Many attributes are already available, but most of the interesting ones haven't even been written yet. Perhaps you will do so.
- Client/Server interprocess communication via shared memory
- JavaBean Proxies
- Book Review: ASP.NET For Dummies
- C# Tips and Tricks
- .NET Tip
- PostgreSQL Ends the Waiting Game
- Object-Oriented Application Development Using the Caché Postrelational Database
- QueryDef - a complete implementation of a dynamic recordset
- Extending CPictureHolder for loading BMP, JPG, etc.
Regional Articles
- Tips: ODBC & Access database Alabama
- Tips: ODBC & Access database Alaska
- Tips: ODBC & Access database Arizona
- Tips: ODBC & Access database Arkansas
- Tips: ODBC & Access database California
- Tips: ODBC & Access database Colorado
- Tips: ODBC & Access database Connecticut
- Tips: ODBC & Access database DC
- Tips: ODBC & Access database Delaware
- Tips: ODBC & Access database Florida
- Tips: ODBC & Access database Georgia
- Tips: ODBC & Access database Hawaii
- Tips: ODBC & Access database Idaho
- Tips: ODBC & Access database Illinois
- Tips: ODBC & Access database Indiana
- Tips: ODBC & Access database Iowa
- Tips: ODBC & Access database Kansas
- Tips: ODBC & Access database Kentucky
- Tips: ODBC & Access database Louisiana
- Tips: ODBC & Access database Maine
- Tips: ODBC & Access database Maryland
- Tips: ODBC & Access database Massachusetts
- Tips: ODBC & Access database Michigan
- Tips: ODBC & Access database Minnesota
- Tips: ODBC & Access database Mississippi
- Tips: ODBC & Access database Missouri
- Tips: ODBC & Access database Montana
- Tips: ODBC & Access database Nebraska
- Tips: ODBC & Access database Nevada
- Tips: ODBC & Access database New Hampshire
- Tips: ODBC & Access database New Jersey
- Tips: ODBC & Access database New Mexico
- Tips: ODBC & Access database New York
- Tips: ODBC & Access database North Carolina
- Tips: ODBC & Access database North Dakota
- Tips: ODBC & Access database Ohio
- Tips: ODBC & Access database Oklahoma
- Tips: ODBC & Access database Oregon
- Tips: ODBC & Access database Pennsylvania
- Tips: ODBC & Access database Rhode Island
- Tips: ODBC & Access database South Carolina
- Tips: ODBC & Access database South Dakota
- Tips: ODBC & Access database Tennessee
- Tips: ODBC & Access database Texas
- Tips: ODBC & Access database Utah
- Tips: ODBC & Access database Vermont
- Tips: ODBC & Access database Virginia
- Tips: ODBC & Access database Washington
- Tips: ODBC & Access database West Virginia
- Tips: ODBC & Access database Wisconsin
- Tips: ODBC & Access database Wyoming
Related Articles
- Visual Basic .NET Attributes
Attributes are classes that allow individual developers to extend VS.NET tools without rebuilding VS.NET each time. Many attributes are already available, but most of the interesting ones haven't even been written yet. Perhaps you will do so.
- Client/Server interprocess communication via shared memory
- JavaBean Proxies
- Book Review: ASP.NET For Dummies
- C# Tips and Tricks
- .NET Tip
- PostgreSQL Ends the Waiting Game
- Object-Oriented Application Development Using the Caché Postrelational Database
- QueryDef - a complete implementation of a dynamic recordset
- Extending CPictureHolder for loading BMP, JPG, etc.

Rss   Delicious   Digg   Add To My Yahoo   Add To My Google   Bookmark   Search Plugin

Topics:
Architecture & Design Languages & Tools Project Management Web Services
Database Microsoft & .NET Security Wireless
Java Open Source Techniques XML