Problems with Pervasive Database

Help
2010-07-30
2013-05-01
  • I got an error like that:

    When I use components SQLQuery + DataSetProvider + ClientDataSet. it working very well,
    but instead of I just use SQLQuery it appeared some dirt on ending of few fields.

    Anybody could help me?

    My configurations is:

    Delphi 2007
    Database : Pervasive.SQL V8


    dbxdrivers.ini

    DbxOpenOdbc=1

    LibraryName=dbxoodbc.dll
    GetDriverFunc=getSQLDriverODBCW
    VendorLib=odbc32.dll
    Trim Char=True

    DirtyRead=0
    ReadCommited=1
    RepeatableRead=2


    dbxconnections.ini

    DriverName=DbxOpenOdbc
    Database=PHOPGM
    User_Name=Master
    Password=senha

     
  • it is known problem
    for details see QC 27159, 73153, 78620, 74646, 22479, 3514, 11589, 8837, 8478

    Version 3.211, 2010-07-31, Beta

    my recommendation:
    - you need load latst dbxoodbc: "Version 3.211, 2010-07-31"

    1) for ANY delphi ide : need install "packages\binary\PkgDbxXXDrv*.bpl"
    2) for your application need add to project: uses …, DbxXXDrv;
            DbxXXDrv.pas uses DbxDBFix.pas
            DbxDBFix.pas -  corrects much QC bugs for all Delphi DB RTL

     
  • Thanks, now work, but in some programs (most complex) have follow error:

    Exception class EAccessViolation with message 'Access violation at address 00404B04 in module 'Teste.exe'.
    Read of address FFFFFFFC'. Process Teste.exe (1064)

    Some suggest?

     
  • Offer to give more information !!!

    1) delphi version ? == D2007
    2) dbxOODBC version ? (hope it is 3.2010.08.08)
    3) database version ? == Pervasive .
    4) connection string ?
    5) add to you project files: uses … DbxOpenOdbcStatic, DbxXXDrv;
    6) add to you project option: Directories: Search path:
           D2009Up
             $(BDS)\source\database
           D2007:
             $(BDS)\Source\database\src\pas\dbx\vcl
             $(BDS)\Source\database\src\pas\dbx\driver
           D2006, D2005:
             $(BDS)\source\win32\db\
           D7,D6:
             %(DELPHI)\source\vcl
    7) run/debug from ide

    When will appear error you see place in code where this will appear and will be able by itself to define reason.
    I think occurs access to pointer which ruined or uninitialized…

     
  • I get error "List Index out of bound (11)" when I execute function Teste at third turn followed.

    Some sugest?

    function Teste: real;
    var
      qry: TSQLQuery;
    begin
      qry := TSQLQuery.Create(Application);
      qry.SQLConnection := dmoAcessos2.MyConnection;
      qry.SQL.Clear;
      qry.SQL.Text := 'SELECT * FROM GCBLC';
      qry.Open;
      if (qry.Eof) then
        Result := 0
      else
        Result := qry.FieldByName('LC_SDOCONCILIADO').Value;
      qry.Close;
      FreeAndNil(qry);
    end;

    My configurations is:

    Delphi 2007
    Database : Pervasive.SQL V8


    dbxdrivers.ini

    DbxOpenOdbc=1

    LibraryName=dbxoodbc.dll
    DriverPackageLoader=TDBXDynalinkDriverLoaderOpenOdbc
    GetDriverFunc=getSQLDriverODBCW
    VendorLib=odbc32.dll

    DirtyRead=0
    ReadCommited=1
    RepeatableRead=2


    dbxconnections.ini

    DriverName=DbxOpenOdbc
    Database=PHOPGM
    User_Name=Master
    Password=senha
    Trim Char=True


    dbxOODBC version = 3.2010.0811b

     
  • Your error beside me is not reproduced.
    The error occurs in what place of the code?

    ? qry.Open;
    ? qry.FieldByName

    For comfort debugging: need add to you project module "DbxOpenOdbcStatic.pas"
    IDE will show pas-file and number of the line in which occurs Exception (when program uncared-for from IDE) !!!

     
  • Error occurs in : 

    Result := qry.FieldByName('LC_SDOCONCILIADO').Value;

    unit DbxOpenOdbc

    line 16970 ->   aOdbcBindCol := TOdbcBindCol(fOdbcBindList);

     
  • Unless it is difficult, enumerate the rows : select col1, col2,…
    Possible error not will if will is excluded what that column.

    Please show structure of your table ( create teable GCBLC … ).
    (At presence of the structure possible I shall be able to repeat your error on other DBMS !!!)

    Set breakpoint in this line (DbxOpenOdbc.pas line 16970)
    When debugging is stopped at this line, need:

    - Open menu item: Run|Evaluate/Modify
      Calculate next expressions:
        1) ColumnNumber
        2) fOdbcBindList.Count
       

    Need testing connection parameter (connectoin string):
      coIgnoreUnkFldType=0
    In last versions he by default became coIgnoreUnkFldType=1