Forum > FPC development

application could not be started correctly (0xc000007)

(1/3) > >>

Weitentaaal:
Hey Guys,

So in my Project im Getting this Error Message(Caption of Topic) when after kompiling. The kompiling was Succsessfull.
I think its because of my sqlite.dll. I Have no clue about 64 Bit dll's and 32 Bit dll's and where they are installed or just how to fix this error.

Thanks for Help ::)

Weitentaaal:
Version 2.0.6
FPC version 3.0.4
x86_64-win64-win32/win64

440bx:
error 0xC000 0007 (STATUS_PAGEFILE_QUOTA) is reported by Windows usually when it encounters a problem related to page file usage.  Most common problem is to run out of space in the page file.  This could be a result of using a fixed page file size or an extensible page file on a drive that has run out of space.  Those are not the only two reasons, other reasons related to the page file are possible.

your first step should be to check your page file usage and accessibility.

HTH.

Weitentaaal:
So i wrote a little Test Programm just to see if it works with my external dll. Error was no more but it was very weird

Code:


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---unit Unit1; {$mode objfpc}{$H+} interface uses  Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls,  sqldb,  SQLite3Conn, DB; type   { TForm1 }   TForm1 = class(TForm)    Button1: TButton;    procedure Button1Click(Sender: TObject);  private   public   end; var  Form1: TForm1;   Procedure dbExecute(var Recordset: TSQLQuery; Query: String); external 'networkdb.dll';  Procedure initNetworkDB(MacAdresse, pathToWGR: String; ZeichnungsNr: Integer; DATABASE_MODE: Integer = 2);external 'networkdb.dll'; implementation {$R *.lfm} { TForm1 } procedure TForm1.Button1Click(Sender: TObject);var  dbT: TSQLQuery;begin  ShowMessage('Before dll');  initNetworkDB('rand','C:\WGKBlck\Data\', 1, 2);  ShowMessage('t1');  dbT := TSQLQuery.Create(nil);  showMessage('t2');  showMessage('t3');  dbExecute(dbT ,'SELECT * FROM Plattentauscher');  ShowMessage('t4');   ShowMessage(dbT.FieldByName('INDEX').Text);   dbT.Free;end;end. 
it just came until ShowMessage('t3'); and after that came nothing anymore... not even an error and there are no endless code blocks
Dll Code :


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---library NetworkDB; {$mode objfpc}{$H+} uses  SysUtils, StrUtils, odbcconn, WinINet, Math, SQLite3Conn, Classes, sqldb, db, Dialogs; type  BBWeb = record      S01, S02, S03, S04, S05, S06, S07, S08, S09, S10, S11, S12, S13, S14, S15, S16, S17, S18, S19, S20, S21, S22, S23, S24, S25: String;      S26, S27, S28, S29, S30, S31, S32, S33, S34, S35, S36, S37, S38, S39, S40, S41, S42, S43, S44, S45, S46, S47, S48, S49, S50: String;      R01, R02, R03, R04, R05, R06, R07, R08, R09, R10, R11, R12, R13, R14, R15, R16, R17, R18, R19, R20, R21, R22, R23, R24, R25: String;      R26, R27, R28, R29, R30, R31, R32, R33, R34, R35, R36, R37, R38, R39, R40, R41, R42, R43, R44, R45, R46, R47, R48, R49, R50: String;      RML: String;  end;   LicenseVar = record    Is3d, Sound, Regis, SysView, EnabMod, TimStamp, ShFact, AlowModfy, PrxStat, PrxCop, SecNumber1, SecNumber2, OwnPick: Integer;    MacAd, Cntry, Firma, FUser, SVers, BBSrvIP1, BBSrvIP2: String;    MFak, SteuFak: Single;    OpenDim: Boolean;  End;   IpVar = record    Byt1, Byt2, Byt3, Byt4: Integer;  End; var  MAC, WGRPath: String;  DB_MODE, ZeichNr: Integer;  mdbConn, mdbWGR: TSQLite3Connection;  sqlConnWGR, sqlConnWSET, sqlConnDEF: TSQLite3Connection;  SQLTransWGR, SQLTransWSET, SQLTransDEF: TSQLTransaction; const  { ----- constants ----- }  BBWebAdresse = 'http://80.247.70.137/'; //oder 'http://80.247.70.136/'  LicUrl = 'http://wgk.weger.it';   MDBPath = 'C:\WGKBlck\Data\wegerset.mdb';  MDBPass = '260599';   WGRPass = 'wgkadmin';   SQLiteWGRPath = 'C:\WGKBlck\Data\Noname.db';  SQLiteWGRPass = 'wgkadmin';   SQLiteWSETPath = 'C:\WGKBlck\Data\wegerset.db';  SQLiteWSETPass = '260599';   SQLiteDEFPath = 'C:\WGKBlck\Data\Definitionen.db'; { ----- initialisation ----- }Procedure initdb(MODE: Integer);Begin //Datenbank initialisieren  DB_MODE := MODE;  Case DB_MODE Of //Verbindungstyp w√§hlen (MSAccess oder SQLite)    1:      Begin        {mdbConn := TODBCConnection.Create(Nil);        mdbConn.Driver := 'Microsoft Access Driver (*.mdb)';        mdbConn.Params.add('DBQ=' + MDBPath);        mdbConn.Params.add('pwd=' + MDBPass);        mdbConn.Connected := true;        mdbConn.KeepConnection := true;        TSQLTransaction.Create(Nil).DataBase := mdbConn;         mdbWGR := TODBCConnection.Create(Nil);        mdbWGR.Driver := 'Microsoft Access Driver (*.mdb)';        mdbWGR.Params.add('DBQ=' + WGRPath);        mdbWGR.Params.add('pwd=' + WGRPass);        mdbWGR.Connected := true;        mdbWGR.KeepConnection := true;        TSQLTransaction.Create(Nil).Database := mdbWGR;}      End;    2:      Begin        Try           Applicatio.i;           { ----- WGR Connect ----- }           sqlConnWGR := TSQLite3Connection.Create(Nil);           sqlConnWGR.DatabaseName := SQLiteWGRPath;           //sqlConnWGR.HostName := SQLiteDBHost;           //sqlConnWGR.UserName := SQLiteDBUser;           sqlConnWGR.Password := SQLiteWGRPass;           sqlConnWGR.Connected := true;           sqlConnWGR.KeepConnection := true;            SQLTransWGR := TSQLTransaction.Create(sqlConnWGR);           sqlConnWGR.Transaction := SQLTransWGR;            { ----- WSET Connect ----- }           sqlConnWSET := TSQLite3Connection.Create(Nil);           sqlConnWSET.DatabaseName := SQLiteWSETPath;           //sqlConnWSET.HostName := SQLiteDBHost;           //sqlConnWSET.UserName := SQLiteDBUser;           sqlConnWSET.Password := SQLiteWSETPass;           sqlConnWSET.Connected := true;           sqlConnWSET.KeepConnection := true;            SQLTransWSET := TSQLTransaction.Create(sqlConnWSET);           sqlConnWSET.Transaction := SQLTransWSET;            { ----- DEF Connect ----- }           sqlConnDEF := TSQLite3Connection.Create(Nil);           sqlConnDEF.DatabaseName := SQLiteDEFPath;           //sqlConnDEF.HostName := SQLiteDBHost;           //sqlConnDEF.UserName := SQLiteDBUser;           //sqlConnDEF.Password := SQLiteWSETPass;           sqlConnDEF.Connected := true;           sqlConnDEF.KeepConnection := true;            SQLTransDEF := TSQLTransaction.Create(sqlConnDEF);           sqlConnDEF.Transaction := SQLTransDEF;           except              //on e:exception do //TODO           end;      End;    Else Exit();  End;End; Procedure initNetworkDB(MacAdresse, pathToWGR: String; ZeichnungsNr: Integer; DATABASE_MODE: Integer = 2);Begin  ShowMessage('initNetworkDb()');  MAC := MacAdresse;  ZeichNr := ZeichnungsNr;  WGRPath := pathToWGR;  initdb(DATABASE_MODE);End; Procedure exitNetworkDB();Begin  Case DB_MODE Of    1:      begin        mdbConn.Close();        mdbconn.CloseDataSets;        mdbWGR.Close();        mdbWGR.CloseDataSets;      end;    2: begin       sqlConnDEF.Close();       sqlConnWGR.Close();       sqlConnWSET.Close();       SQLTransDEF.CloseDataSets;       SQLTransWGR.CloseDataSets;       SQLTransWSET.CloseDataSets;    end;  End;End; { ----- implementation ---- }Procedure dbExecute(var Recordset: TSQLQuery; Query: String); //TSQLQuery entspricht VB6 Recordset (fast)Begin  Recordset.Free;  Recordset := TSQLQuery.Create(nil);  Case DB_MODE Of    1: Recordset.DataBase := mdbConn;    2: Recordset.DataBase := sqlConnWSET;  End;  Recordset.UsePrimaryKeyAsKey := False;  Recordset.PacketRecords := -1;  Recordset.SQL.Text := Query;  Recordset.Open;End; Procedure wgrExecute(var Recordset: TSQLQuery; Query: String);Begin  Recordset.Free;  Recordset := TSQLQuery.Create(nil);  Recordset.UsePrimaryKeyAsKey := False;  Case DB_MODE Of     1: Recordset.DataBase := mdbWGR;     2: Recordset.DataBase := sqlConnWGR;  End;  Recordset.PacketRecords := -1;  Recordset.SQL.Text := Query;  Recordset.Open;End; Procedure defExecute(var Recordset: TSQLQuery; Query: String);Begin  Recordset.Free;  Recordset := TSQLQuery.Create(nil);  Recordset.UsePrimaryKeyAsKey := False;  Case DB_MODE Of     //1: //Recordset.DataBase := mdbWGR;     2: Recordset.DataBase := sqlConnDEF;  End;  Recordset.PacketRecords := -1;  Recordset.SQL.Text := Query;  Recordset.Open;End; procedure EditField(ToEditField, Tabelle, ToEdit, DATA : String);var   SQLQuery : TSQLQuery;begin   SQLQuery := TSQLQuery.Create(Nil);   SQLQuery.DataBase := sqlConnWGR;    SQLQuery.FieldByName('SELECT * FROM ' +Tabelle+ ' WHERE DATA = ' +DATA+ ';');   SQLQuery.Edit();   SQLQuery.FieldByName(ToEditField).NewValue := ToEdit;   SQLQuery.Post();   SQLQuery.UpdateMode :=  upWhereAll;   SQLQuery.ApplyUpdates();   SQLQuery.Closeend; exports  EditField,  initNetworkDB,  initdb,  exitNetworkDB,  dbExecute,  wgrExecute,  defExecute;end.  
it came until

440bx:
I suggest you do this:

1. Reboot your computer
2. Immediately run the program that is giving you problems

The question is: does the program run successfully or not immediately after a reboot ?

If successful then it is quite likely the problem is caused by something external to the program (such as page file usage), if not then the cause of the problem is likely due to something in the code.

HTH.

Navigation

[0] Message Index

[#] Next page

Go to full version