#1  
Old 30th October 2019, 10:05 PM
Gary Mugford Gary Mugford is offline
Junior Member
 
Join Date: Oct 2018
Posts: 5
Default I am going bonkers

Yep, I admit defeat. I have to regularly port a full set of Paradox tables to a folder where I use the resulting NexusDB files to do some reporting that takes advantage of NexusDB's ability to run LOTS of sql statements in a loop and not blow up. I run the importer using the following CFG setting:

Code:
# Nexus Import Parameters Version 3.00
# === Transfer Manager ======================================
# Automatic Mode
-auto-
# Leave progress display automatically
-nowait-
# Transfer Type (nttMerge, nttReplace, nttDuplicate, nttLayout)
-ot=nttDuplicate
# String Handling (nshSource, nshNull, nshEmpty)
-os=nshSource
# Transaction block size
#    Value
#    Unit
-ob=100;Record(s)
# Convert Indexes
-ox+
# Attributes for text fields in indexes
#    Language
#    Sorting
#    Locale
#    Ignore Case
#    Ignore Width
#    Use String Sort
#    Ignore Kana Type
#    Ignore Symbols
#    Ignore Non Space
-oi=Process Default Language;Sorting Default;$00000400;False;False;True;False;False;False
# Substitutes for indexes without name
#    Primary index
#    Secondary index(es)
-op=NX$PRIMARY;NX$INDEX
# === Borland Database Engine ===============================
# Directory Mode
-bd+
# Alias Name
-ba=D:\Lpgms\OT6\Data
# Table Name(s)
-bt=621.DB
... lots and lots of DBs
-bt=YrRMExCP.DB
# Field Name(s)
# Range Usage
-rr-
# Range Index
#    RangeStartKeyExclusive
#    RangeEndKeyExclusive
#    Index Name
-ri=False;False;
# Range start
#    FieldName
#    FieldType
#    Null
#    Value
# Range end
#    FieldName
#    FieldType
#    Null
#    Value
# Filter usage
-rf-
# Filter definition
# === Nexus Engine ==========================================
# Server Name
-ns=Directory Mode (Embedded)
# Database Name
-nd=T:\_Source_NData\Nexus2
# Table Name(s)
-nt=Original name will be used.
# Field Name(s)
The App that I am running once the data is ported over is running with embedded Nexus. I do NOT have the server running. This is just an app for me and I'm NOT at the customer site. The App starts with a bunch of databases, none active.

Having gotten ALL of the data across to the Nexus2 folder, no secondary indexes make it over. When I run the app and hit the button to do the job, I get a complaint:

The button code is this:

Code:
procedure TFrmMain.AdvGlassButton7Click(Sender: TObject);
begin
  // 9/5/2018 12:11:50 PM ED:
  // ensure that RMCalc's index on Part exists, cuz we are going to use it
  // now includes creation of ALL indexes
  //qNXUtilityMan1.ExecSQL;   // NEED TO CHECK IF INDEXES EXIST BEFORE RUNNING!!!!
//  tblLRMcalc.IndexDefs.Clear;
  qNxRMCalcIndex.ExecSQL;
//  tblLRecipe.IndexDefs.Clear;
  qNxRecipeIndex.ExecSQL;
//  tblLProdLots.IndexDefs.Clear;
  qNxProdLotsIndex.ExecSQL;
//  tblLProdTraf.IndexDefs.Clear;
  qNxProdTrafIndex.ExecSQL;
  CreateFillAndSaveXLS; // Activates DBs, analyses and then exports to XLS
end;
I initially ran the Clear functions, but in experimenting, I didn't seem to need it. The code, for example, in one of the Index.ExecSQL's look like this:

Code:
DROP INDEX IF EXISTS ProdTraf.LotNum;
CREATE INDEX PartNum ON ProdTraf(LotNum)
Seems pretty straightforward. It SHOULD, like the others, build the index that lets me connect each of these databases back to the central DB around a PartNum field that is the primary key to all of them.

Except, it seems, EVERY other windy day with precipitation in the forecast, it shows an error that one of the indexes is missing.

Sooo, I thought I'd do it the old-fashioned table object way. I set up a button to SPECIFICALLY create the index for that TNxTable object. When the Windy Day (by the way, it's blowing up a storm out there right now) comes, and the normal set of SQL exec'ing fails to produce the secondary index, this function fails to create an index that the program can subsequently use:

Code:
procedure TFrmMain.btnOldProdTrafIndexClick(Sender: TObject);
var
  ActiveState: Boolean;
begin
  ActiveState := tblLProdTraf.Active;
  tblLProdTraf.Active := False;
  tblLProdTraf.AddIndex('OnLotNum','LotNum',[ixUnique]);
  tblLProdTraf.IndexName := 'OnLotNum';
  tblLProdTraf.Active := ActiveState;
end;
I also tried the same code with ixPrimary. In both cases, it fails. Sometimes with a message that there is an index already. Sometimes with a 'can't create index' message.

Guidance? Anybody? I HONESTLY have tried working through this and all the examples I can get my hands on. I'm switching back and forth between D7 and XE7.

I see the wind has died down. And just like that, the app runs without bloody problems. Sigh.

NOTE: Yes, my computer is rickety and crashy and running Win 7. It COULD be a memory error. It's or mine, I cannot tell you.
  #2  
Old 30th October 2019, 10:37 PM
David Rose
 
Posts: n/a
Default Re: I am going bonkers

>On 30/10/2019 10:05, Gary Mugford wrote:

First thing I always do when I have any sort of intermittent issue like
this is to make sure all anti-virus/anti-malware etc programs exclude
the data folder.
Probably a red herring, but always a good start IMHO.

David
  #3  
Old 30th October 2019, 10:51 PM
Gary Mugford Gary Mugford is offline
Junior Member
 
Join Date: Oct 2018
Posts: 5
Default

Quote:
Originally Posted by David Rose View Post
>On 30/10/2019 10:05, Gary Mugford wrote:

First thing I always do when I have any sort of intermittent issue like
this is to make sure all anti-virus/anti-malware etc programs exclude
the data folder.
Probably a red herring, but always a good start IMHO.

David
Yeah, it is and thanks for mentioning it. I've used eSet forever, but they didn't want my money and after four attempts to renew I decided i would go elsewhere. Work uses Avast! So I thought I'd give it another go. It was the predecessor to eSet and the successor to a LOOOOOOONG list of others in the A-C alphabetical group. And Avast! has had a nasty habit of outlawing the printer and other shared devices at work after the most recent updates to Windows 10, the server and Avast itself. So it's not like Avast is a good word around these parts right now.

I'll turn it and Comodo Firewall off the next time I try this. If it works then and continues to work, it's only a moment's work to turn them off and then on again.

Appreciate you taking the time to help. GM
  #4  
Old 31st October 2019, 08:43 PM
David Rose
 
Posts: n/a
Default Re: I am going bonkers

On 30/10/2019 10:51, Gary Mugford wrote:

>
> I'll turn it and Comodo Firewall off the next time I try this. If it
> works then and continues to work, it's only a moment's work to turn them
> off and then on again.
>


You could just set it to exclude the data folder and then drop a copy of
eicar.com in there to confirm it really is excluding it.
I keep meaning to write a server extension that drops eicar.com in to
all Aliases and then periodically checks that it's not been quarantined,
but never seem to quite have the time.

David


  #5  
Old 31st October 2019, 09:18 PM
Gary Mugford Gary Mugford is offline
Junior Member
 
Join Date: Oct 2018
Posts: 5
Default

Quote:
Originally Posted by David Rose View Post
On 30/10/2019 10:51, Gary Mugford wrote:

>
> I'll turn it and Comodo Firewall off the next time I try this. If it
> works then and continues to work, it's only a moment's work to turn them
> off and then on again.
>


You could just set it to exclude the data folder and then drop a copy of
eicar.com in there to confirm it really is excluding it.
I keep meaning to write a server extension that drops eicar.com in to
all Aliases and then periodically checks that it's not been quarantined,
but never seem to quite have the time.

David
I guess I'm showing my age and lack of global awareness of the Internet. I honestly had NO clue what you were talking about, but I assumed a link was worth clicking on and investigating. Apparently, the file in question is a downloadable bit of software that is NOT a virus, but is intended to APPEAR as one to AV software. A FALSE POSITIVE, as it were. Placing it in the folder of the application development will test whether the white-listing of the folder is working or not. That way, I don't have to fiddle with the on and off status of the AV software ... though it does nothing for Comodo Firewall.

Have I got that right?? Are the AV companies co-operating with this??

I'm going to chew on this for a bit. I'm willing to abide with Avast! complaining with every new compile of the program. If it stops working, I turn Avast off (and Comodo too), re-compile again and off we go. If I'm directly running the app rather than fiddling with it from the IDE, I expect NOT to see the initial Avast harassment. If the app suddenly FORGETS it ran successfully in the IDE, I turn off Avast and Comodo and see if that affects the outcome. Once I establish IT DOES, then I KNOW AVAST IS INVOLVED. At that point, I probably switch AV's again. There ARE letters beyond A-E.

There's also the OTHER potential threat to everything, Microsoft's built-in security updates. I obviously have the AV turned off in my WIn 7 environment. But I still have to download those monthly updates. How tangential those updates and my problems are, makes for an interesting (cuz it's a pain in the butt, not that it's INTERESTING) side issue.

Bah!! It's month's end. Tomorrow, I have to download the data anew and see if it ruins my enjoyment of the basketball game.

Thanks, once again, for an informative and thought-provoking expenditure of your time. GM
  #6  
Old 1st November 2019, 10:14 AM
David Rose
 
Posts: n/a
Default Re: I am going bonkers

On 31/10/2019 09:18, Gary Mugford wrote:
> Have I got that right?? Are the AV companies co-operating with this??


Spot on.
I believe they are. Certainly it's always worked as test for me.

David


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT +11. The time now is 11:00 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.