Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM General » View Thread |
Messages 1 to 10 of 14 total |
11013 |
Wed, Mar 5 2008 11:49 PM | Permanent Link |
Silven | Can some please tell me why this function is causing an 11013 error...
Info: Delphi 2006 DBISAM Version 4.25 (4.25 Build 3) McAfee -- disabled if I call the below function and afterwards try and get the table t_SpeciersParams to open with excluive = true I get the error. function TLABPARAM.GetSpecicesParamMinMax2(intParameterID: Integer; intNumParameters: Integer; bolMin: boolean) : TFloatArray; //Get the min/max values for var q : TDBISAMQuery; strCol: string; arrMinMax : TFloatArray; begin SetLength(arrMinMax, intNumParameters); if bolMin then strCol := 'LabParamMin' else strCol := 'LabParamMax'; q := TDBISAMQuery.Create(NIL); q.Active := FALSE; q.DatabaseName := 'SECURITY'; //q.RequestLive := false; //q.ReadOnly := true; //q.Close; //q.SQL.Clear ; //q.SQL.Text := 'SELECT * FROM t_SpeciesLabParams WHERE LabParamID = ' + inttostr(intParameterID) + ';'; q.SQL.Clear; q.Sql.Add('SELECT * FROM t_SpeciesLabParams WHERE LabParamID = ' + inttostr(intParameterID) + ';') ; q.prepare; try q.open; except on e: exception do begin showmessage(e.Message); q.Close; q.UnPrepare; exit; end; end; if not q.Eof then begin q.First; while not q.EOF do begin //arrMinMax[q.FieldByName('SpeciesID').AsInteger] := q.FieldByName(strCol).AsFloat; arrMinMax[q.FieldByName('SpeciesID').AsInteger] := q.FieldByName(strCol).AsString; q.Next; end; end; //q.Active := false; q.Close; q.UnPrepare; //q.free; //q := nil; Result := arrMinMax; end; Thanks |
Thu, Mar 6 2008 5:00 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Silven,
<< if I call the below function and afterwards try and get the table t_SpeciersParams to open with excluive = true I get the error. >> It's most likely McAfee that is causing the error. Do a search of this newsgroup here: http://www.elevatesoft.com/scripts/newsgrp.dll?action=search&group=DBISAM%20General on '11013 anti-virus' and you'll get an idea of what the problem is. -- Tim Young Elevate Software www.elevatesoft.com |
Fri, Mar 7 2008 12:48 AM | Permanent Link |
silven | Hi Tim,
I uninstalled McAfee I am still having the issue... please note that this application has multiple tables and this is the first time I am encountering such a problem. Thanks, Silven "Tim Young [Elevate Software]" <timyoung@elevatesoft.com> wrote: Silven, << if I call the below function and afterwards try and get the table t_SpeciersParams to open with excluive = true I get the error. >> It's most likely McAfee that is causing the error. Do a search of this newsgroup here: http://www.elevatesoft.com/scripts/newsgrp.dll?action=search&group=DBISAM%20General on '11013 anti-virus' and you'll get an idea of what the problem is. -- Tim Young Elevate Software www.elevatesoft.com |
Fri, Mar 7 2008 1:28 AM | Permanent Link |
silven | Tim, It seems that my DB component TDBISAMDatabase; had the KeepTablesOpen:= True : this seems to be causing the 11013? If I set it to false all is well.
thanks, silven Silven <silven@canada.com> wrote: Can some please tell me why this function is causing an 11013 error... Info: Delphi 2006 DBISAM Version 4.25 (4.25 Build 3) McAfee -- disabled if I call the below function and afterwards try and get the table t_SpeciersParams to open with excluive = true I get the error. function TLABPARAM.GetSpecicesParamMinMax2(intParameterID: Integer; intNumParameters: Integer; bolMin: boolean) : TFloatArray; //Get the min/max values for var q : TDBISAMQuery; strCol: string; arrMinMax : TFloatArray; begin SetLength(arrMinMax, intNumParameters); if bolMin then strCol := 'LabParamMin' else strCol := 'LabParamMax'; q := TDBISAMQuery.Create(NIL); q.Active := FALSE; q.DatabaseName := 'SECURITY'; //q.RequestLive := false; //q.ReadOnly := true; //q.Close; //q.SQL.Clear ; //q.SQL.Text := 'SELECT * FROM t_SpeciesLabParams WHERE LabParamID = ' + inttostr(intParameterID) + ';'; q.SQL.Clear; q.Sql.Add('SELECT * FROM t_SpeciesLabParams WHERE LabParamID = ' + inttostr(intParameterID) + ';') ; q.prepare; try q.open; except on e: exception do begin showmessage(e.Message); q.Close; q.UnPrepare; exit; end; end; if not q.Eof then begin q.First; while not q.EOF do begin //arrMinMax[q.FieldByName('SpeciesID').AsInteger] := q.FieldByName(strCol).AsFloat; arrMinMax[q.FieldByName('SpeciesID').AsInteger] := q.FieldByName(strCol).AsString; q.Next; end; end; //q.Active := false; q.Close; q.UnPrepare; //q.free; //q := nil; Result := arrMinMax; end; Thanks |
Fri, Mar 7 2008 10:27 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Silven,
<< Tim, It seems that my DB component TDBISAMDatabase; had the KeepTablesOpen:= True : this seems to be causing the 11013? If I set it to false all is well. >> That wouldn't cause an issue unless you opened the table exclusively at some point elsewhere in your application. Is that the case ? The code that you showed was a query, and a query won't open a table exclusively unless the SQL SELECT statement contains an EXCLUSIVE keyword after each source table name in the FROM clause. -- Tim Young Elevate Software www.elevatesoft.com |
Fri, Mar 7 2008 12:50 PM | Permanent Link |
silven | Hi Tim,
The table is used twice in the application 1. using the query I showed you 2. After the query on a second button click, I try to open the table in exclusive mode, It is at this point that I was getting the error until I set KeepTablesOpen:= False. I know it is the query causing the problem because if I remove the step that calls this function with the query I sent I have no problem clicking the second button putting the table in exclusive mode and then emptying. It is like to query or something is holding the table for some reason not sure why. Any thoughts? Thanks, Silven "Tim Young [Elevate Software]" <timyoung@elevatesoft.com> wrote: Silven, << Tim, It seems that my DB component TDBISAMDatabase; had the KeepTablesOpen:= True : this seems to be causing the 11013? If I set it to false all is well. >> That wouldn't cause an issue unless you opened the table exclusively at some point elsewhere in your application. Is that the case ? The code that you showed was a query, and a query won't open a table exclusively unless the SQL SELECT statement contains an EXCLUSIVE keyword after each source table name in the FROM clause. -- Tim Young Elevate Software www.elevatesoft.com |
Fri, Mar 7 2008 2:17 PM | Permanent Link |
"Robert" | "silven" <silven@canada.com> wrote in message news:652CAE81-9A5C-4420-8CDF-B68AA360E52A@news.elevatesoft.com... > Tim, It seems that my DB component TDBISAMDatabase; had the > KeepTablesOpen:= True : this seems to be causing the 11013? If I set it > to false all is well. > I have just confirmed this. If keeptablesopen is true, the unrepare does not release the the table. Code is as follows (first open query, then open table): procedure TForm1.Button2Click(Sender: TObject); begin dbisamdatabase1.Connected := false; //after adding line above, I can open the table //otherwise, 11013 t1.Open; end; procedure TForm1.Button1Click(Sender: TObject); begin if cb.Checked then q1.Prepare; //if not doing explicit prepare, all is well try q1.Open; except on e:Exception do showmessage('bummer'); end; while not q1.Eof do q1.Next; q1.Close; if cb.Checked then q1.UnPrepare; end; Robert |
Fri, Mar 7 2008 2:47 PM | Permanent Link |
silven | Hi Robert,
Thanks for the response... this maybe unsignificant or naive but what is the cb.Checked for. I am assuming it is just a checkbox indicating which mode you are in (KeepTablesOpen true or false) Thanks, Silven "Robert" <ngsemail2005withoutthis@yahoo.com.ar> wrote: "silven" <silven@canada.com> wrote in message news:652CAE81-9A5C-4420-8CDF-B68AA360E52A@news.elevatesoft.com... > Tim, It seems that my DB component TDBISAMDatabase; had the > KeepTablesOpen:= True : this seems to be causing the 11013? If I set it > to false all is well. > I have just confirmed this. If keeptablesopen is true, the unrepare does not release the the table. Code is as follows (first open query, then open table): procedure TForm1.Button2Click(Sender: TObject); begin dbisamdatabase1.Connected := false; //after adding line above, I can open the table //otherwise, 11013 t1.Open; end; procedure TForm1.Button1Click(Sender: TObject); begin if cb.Checked then q1.Prepare; //if not doing explicit prepare, all is well try q1.Open; except on e:Exception do showmessage('bummer'); end; while not q1.Eof do q1.Next; q1.Close; if cb.Checked then q1.UnPrepare; end; Robert |
Fri, Mar 7 2008 3:10 PM | Permanent Link |
"Robert" | "silven" <silven@canada.com> wrote in message news:B6C93715-78A8-4025-B85E-23657A2E5A80@news.elevatesoft.com... > Hi Robert, > Thanks for the response... this maybe unsignificant or naive but what is > the cb.Checked for. I am assuming it is just a checkbox indicating which > mode you are in > (KeepTablesOpen true or false) > With KeepTablesOpen false there is no problem, as you had indicated. I wanted to test with or without the explicit prepare. If you don't do an explicit prepare, again it runs with no problem. It's the combination of both - keeptables open and the prepare - that causes the problem. I think this is a bug (Tim will confirm or deny, I'm sure). Unprepare should put everything back to where it was before the prepare. Robert > > > Thanks, > Silven > > "Robert" <ngsemail2005withoutthis@yahoo.com.ar> wrote: > > > "silven" <silven@canada.com> wrote in message > news:652CAE81-9A5C-4420-8CDF-B68AA360E52A@news.elevatesoft.com... >> Tim, It seems that my DB component TDBISAMDatabase; had the >> KeepTablesOpen:= True : this seems to be causing the 11013? If I set it >> to false all is well. >> > > I have just confirmed this. If keeptablesopen is true, the unrepare does > not > release the the table. Code is as follows (first open query, then open > table): > > procedure TForm1.Button2Click(Sender: TObject); > begin > dbisamdatabase1.Connected := false; > //after adding line above, I can open the table > //otherwise, 11013 > t1.Open; > end; > > procedure TForm1.Button1Click(Sender: TObject); > begin > if cb.Checked then q1.Prepare; > //if not doing explicit prepare, all is well > try > q1.Open; > except > on e:Exception do showmessage('bummer'); > end; > while not q1.Eof do q1.Next; > q1.Close; > if cb.Checked then q1.UnPrepare; > end; > > > Robert > > |
Fri, Mar 7 2008 3:26 PM | Permanent Link |
silven | Thanks Robert
"Robert" <ngsemail2005withoutthis@yahoo.com.ar> wrote: "silven" <silven@canada.com> wrote in message news:B6C93715-78A8-4025-B85E-23657A2E5A80@news.elevatesoft.com... > Hi Robert, > Thanks for the response... this maybe unsignificant or naive but what is > the cb.Checked for. I am assuming it is just a checkbox indicating which > mode you are in > (KeepTablesOpen true or false) > With KeepTablesOpen false there is no problem, as you had indicated. I wanted to test with or without the explicit prepare. If you don't do an explicit prepare, again it runs with no problem. It's the combination of both - keeptables open and the prepare - that causes the problem. I think this is a bug (Tim will confirm or deny, I'm sure). Unprepare should put everything back to where it was before the prepare. Robert > > > Thanks, > Silven > > "Robert" <ngsemail2005withoutthis@yahoo.com.ar> wrote: > > > "silven" <silven@canada.com> wrote in message > news:652CAE81-9A5C-4420-8CDF-B68AA360E52A@news.elevatesoft.com... >> Tim, It seems that my DB component TDBISAMDatabase; had the >> KeepTablesOpen:= True : this seems to be causing the 11013? If I set it >> to false all is well. >> > > I have just confirmed this. If keeptablesopen is true, the unrepare does > not > release the the table. Code is as follows (first open query, then open > table): > > procedure TForm1.Button2Click(Sender: TObject); > begin > dbisamdatabase1.Connected := false; > //after adding line above, I can open the table > //otherwise, 11013 > t1.Open; > end; > > procedure TForm1.Button1Click(Sender: TObject); > begin > if cb.Checked then q1.Prepare; > //if not doing explicit prepare, all is well > try > q1.Open; > except > on e:Exception do showmessage('bummer'); > end; > while not q1.Eof do q1.Next; > q1.Close; > if cb.Checked then q1.UnPrepare; > end; > > > Robert > > |
Page 1 of 2 | Next Page » | |
Jump to Page: 1 2 |
This web page was last updated on Saturday, May 4, 2024 at 12:54 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |