Recent

Author Topic: SQLPrimaryKeys + MS Access Driver  (Read 4767 times)

DimProfi

  • Full Member
  • ***
  • Posts: 126
    • http://www.dimprofi.de
SQLPrimaryKeys + MS Access Driver
« on: November 25, 2007, 03:43:45 am »
Quote
The MS Access ODBC driver seems not to support the SQLPrimaryKeys API function, hence UpdateIndexDefs will fail. Currently, you must set SQLQuery.ReadOnly:=true; to avoid an exception until code has been added that tests for the availability of the function in the driver


Source: http://wiki.lazarus.freepascal.org/ODBCConn

Is there any solution or walkaround for readwrite-acesss to MS-Access Databases with lazarus?
Lazarus 1.2/FPC 2.6.4 (x86/x86_64/win32/win64/Linux) :: Be smart - use predictable {$INTERFACES CORBA}! :)

DimProfi

  • Full Member
  • ***
  • Posts: 126
    • http://www.dimprofi.de
Help your self is the best solution
« Reply #1 on: November 26, 2007, 01:28:00 am »
Just use Unit "odbcsql" from FPC Package.

See Example in
"lazarus\fpc\2.2.0\source\packages\base\odbc\testodbc.pp"

It works!
Lazarus 1.2/FPC 2.6.4 (x86/x86_64/win32/win64/Linux) :: Be smart - use predictable {$INTERFACES CORBA}! :)

DimProfi

  • Full Member
  • ***
  • Posts: 126
    • http://www.dimprofi.de
RE: Help your self is the best solution
« Reply #2 on: November 26, 2007, 01:29:35 am »
Thanks to mymself.  :D
Lazarus 1.2/FPC 2.6.4 (x86/x86_64/win32/win64/Linux) :: Be smart - use predictable {$INTERFACES CORBA}! :)

jdazag

  • Newbie
  • Posts: 1
Odbcsql Unit
« Reply #3 on: November 30, 2007, 04:08:45 pm »
Hi,

Do you have any sample project?

Thanks  :D
jdazag

DimProfi

  • Full Member
  • ***
  • Posts: 126
    • http://www.dimprofi.de
RE: Odbcsql Unit
« Reply #4 on: December 18, 2007, 01:50:48 am »
Quote from: "jdazag"
Hi,

Do you have any sample project?

Thanks  :D
jdazag
See:
lazarus\fpc\2.2.0\source\packages\base\odbc\testodbc.pp

It works!
Lazarus 1.2/FPC 2.6.4 (x86/x86_64/win32/win64/Linux) :: Be smart - use predictable {$INTERFACES CORBA}! :)

 

TinyPortal © 2005-2018