Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 9 of 9 total
Thread CDCollector in Example folder - "Access violation at address...."
Tue, Jul 24 2007 6:49 AMPermanent Link

PilotJJ
Tim,
I am using Delphi 2007 and I try to run the CDCollector example in the Example folder (EDB 1.4 b6) but I get a "Access violation at address..." error.
I have run the example without problems using EDB 1.4 b5. Do you know what the problem could be?.

The problem is in the following code:
  with ConfigurationQuery do
     begin
     SQL.Text:='SELECT * FROM Databases WHERE Name='+Engine.QuotedSQLStr('CDCollector'); <======== PROBLEM LINE
     Open;
     if (RecordCount=0) then
        begin
        { Database doesn't exist and we need to create it }
        Close;
        SQL.Text:='CREATE DATABASE "CDCollector" PATH '+
                   Engine.QuotedSQLStr(ExtractFilePath(Application.ExeName)+'data');
        ExecSQL;
        end
     else
        Close;
     end;
  { Now we can open the CDCollector database and start to check the metadata for
    the database.  If anything is missing, we create it now in the proper order
    so as to respect any foreign key <--> primary key RI relationships.

Regards
PilotJJ
Tue, Jul 24 2007 6:52 AMPermanent Link

PilotJJ
PilotJJ <koos.loots@absa.co.za> wrote:

Tim,
I am using Delphi 2007 and I try to run the CDCollector example in the Example folder (EDB 1.4 b6) but I get a "Access violation at address..." error.
I have run the example without problems using EDB 1.4 b5. Do you know what the problem could be?.

The problem is in the following code:
  with ConfigurationQuery do
     begin
     SQL.Text:='SELECT * FROM Databases WHERE Name='+Engine.QuotedSQLStr('CDCollector'); <======== PROBLEM LINE
     Open;
     if (RecordCount=0) then
        begin
        { Database doesn't exist and we need to create it }
        Close;
        SQL.Text:='CREATE DATABASE "CDCollector" PATH '+
                   Engine.QuotedSQLStr(ExtractFilePath(Application.ExeName)+'data');
        ExecSQL;
        end
     else
        Close;
     end;
  { Now we can open the CDCollector database and start to check the metadata for
    the database.  If anything is missing, we create it now in the proper order
    so as to respect any foreign key <--> primary key RI relationships.

Regards
PilotJJ

Sorry Tim, what I didn't mention was that I am trying to create a database and tables at runtime and I trying to use the CDCollector example as a starting
point.
Tue, Jul 24 2007 3:56 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com


<< I am using Delphi 2007 and I try to run the CDCollector example in the
Example folder (EDB 1.4 b6) but I get a "Access violation at address..."
error.  I have run the example without problems using EDB 1.4 b5. Do you
know what the problem could be?.  >>

I can't seem to replicate that here at all.   Does the configuration file
(edbconfig.edbcfg) exist prior to starting the application ?  How about the
database catalog and tables ?

--
Tim Young
Elevate Software
www.elevatesoft.com

Wed, Jul 25 2007 4:25 AMPermanent Link

Koos Loots
"Tim Young [Elevate Software]" <timyoung@elevatesoft.com> wrote:


<< I am using Delphi 2007 and I try to run the CDCollector example in the
Example folder (EDB 1.4 b6) but I get a "Access violation at address..."
error.  I have run the example without problems using EDB 1.4 b5. Do you
know what the problem could be?.  >>

I can't seem to replicate that here at all.   Does the configuration file
(edbconfig.edbcfg) exist prior to starting the application ?  How about the
database catalog and tables ?

--
Tim Young
Elevate Software
www.elevatesoft.com

Yes Tim, the edbconfig.edbcfg file exist. I am stack now because if the CDCollector example does not work I don't know where to start learning ElevateDB.
Another problem is when I build the example application it's complaining obout the directive "{$I edbversion.inc}" with the error message "F1026 File not
found: 'edbversion.inc'". Like previously mentioned I am using Delphi 2007.

Regards
Koos Loots


Wed, Jul 25 2007 3:56 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Koos,

<< Yes Tim, the edbconfig.edbcfg file exist. >>

What about the database catalog and tables ?  IOW, do you have

<< I am stack now because if the CDCollector example does not work I don't
know where to start learning ElevateDB. >>

It most definitely works.  We just have to figure out what is going on in
your situation.   Are you using the Unicode version of EDB or the ANSI
version ?

<< Another problem is when I build the example application it's complaining
obout the directive "{$I edbversion.inc}" with the error message "F1026 File
not found: 'edbversion.inc'". Like previously mentioned I am using Delphi
2007. >>

Check your Library Search Path in D2007 under Tools/Options/Environment
Options/Delphi Options/Library - Win32/Library path and make sure that it is
set properly to include a path to the <InstallDir\code directory for EDB.

--
Tim Young
Elevate Software
www.elevatesoft.com

Thu, Jul 26 2007 5:25 AMPermanent Link

Koos Loots
"Tim Young [Elevate Software]" <timyoung@elevatesoft.com> wrote:

Koos,

<< Yes Tim, the edbconfig.edbcfg file exist. >>

What about the database catalog and tables ?  IOW, do you have

<< I am stack now because if the CDCollector example does not work I don't
know where to start learning ElevateDB. >>

It most definitely works.  We just have to figure out what is going on in
your situation.   Are you using the Unicode version of EDB or the ANSI
version ?

<< Another problem is when I build the example application it's complaining
obout the directive "{$I edbversion.inc}" with the error message "F1026 File
not found: 'edbversion.inc'". Like previously mentioned I am using Delphi
2007. >>

Check your Library Search Path in D2007 under Tools/Options/Environment
Options/Delphi Options/Library - Win32/Library path and make sure that it is
set properly to include a path to the <InstallDir\code directory for EDB.

--
Tim Young
Elevate Software
www.elevatesoft.com

Tim,

Before answering your questions just the following: I went home last night and on my home PC it works 100%. I use the same EDB install files on both
PC's.

<<What about the database catalog and tables ?  

Can't see a Catalog file but .EDBCfg, .EDBLck & .EDBLog files are there.

<<IOW, do you have>>

IOW ???

<<Are you using the Unicode version of EDB or the ANSI
version ?>>

Where can I see what version. I tried ABOUT.

<<Check your Library Search Path in D2007 under Tools/Options/Environment
Options/Delphi Options/Library - Win32/Library path and make sure that it is
set properly to include a path to the <InstallDir\code directory for EDB.>>

I have changed the Library Search Path and thank you this problem is solved. Know "F1026 File
not found: 'edbversion.inc'" message anymore.

The problem is onthis line of code:
SQL.Text := 'SELECT * FROM Databases WHERE Name=' + Engine.QuotedSQLStr('PersTAX');

It is as if the application does not want to assign something to SQL.Text or anything with the "ConfigurationQuery"

Regards
Koos





Thu, Jul 26 2007 1:25 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Koos,

<< Before answering your questions just the following: I went home last
night and on my home PC it works 100%. I use the same EDB install files on
both PC's. >>

Very peculiar.

<< IOW ??? >>

Sorry - it means In Other Words.

<< Where can I see what version. I tried ABOUT. >>

It says so in the download name - if you're using the Unicode version you'll
see a "(Unicode)" at the end of the download name that you downloaded.

<< The problem is onthis line of code:
SQL.Text := 'SELECT * FROM Databases WHERE Name=' +
Engine.QuotedSQLStr('PersTAX');

It is as if the application does not want to assign something to SQL.Text
or anything with the "ConfigurationQuery" >>

And you didn't modify any of the example at all, correct ?

--
Tim Young
Elevate Software
www.elevatesoft.com

Fri, Jul 27 2007 3:57 AMPermanent Link

Koos Loots
"Tim Young [Elevate Software]" <timyoung@elevatesoft.com> wrote:

Koos,

<< Before answering your questions just the following: I went home last
night and on my home PC it works 100%. I use the same EDB install files on
both PC's. >>

Very peculiar.

<< IOW ??? >>

Sorry - it means In Other Words.

<< Where can I see what version. I tried ABOUT. >>

It says so in the download name - if you're using the Unicode version you'll
see a "(Unicode)" at the end of the download name that you downloaded.

<< The problem is onthis line of code:
SQL.Text := 'SELECT * FROM Databases WHERE Name=' +
Engine.QuotedSQLStr('PersTAX');

It is as if the application does not want to assign something to SQL.Text
or anything with the "ConfigurationQuery" >>

And you didn't modify any of the example at all, correct ?

--
Tim Young
Elevate Software
www.elevatesoft.com

Tim,

<<Very peculiar.>>

I am dead serious. At home it works fine.

<<And you didn't modify any of the example at all, correct ?>>

No I did not change the example code. This line of code is from a new project I created. The example does not work on this PC at work (code unchanged).

<<It says so in the download name - if you're using the Unicode version you'll
see a "(Unicode)" at the end of the download name that you downloaded.>>

Ok. It's deffinitly not the "(Unicode)" version. Why does it work on my home PC?. (same install files)

Regards
Koos

Fri, Jul 27 2007 5:18 AMPermanent Link

Koos Loots
Koos Loots <koos.loots@absa.co.za> wrote:

"Tim Young [Elevate Software]" <timyoung@elevatesoft.com> wrote:

Koos,

<< Before answering your questions just the following: I went home last
night and on my home PC it works 100%. I use the same EDB install files on
both PC's. >>

Very peculiar.

<< IOW ??? >>

Sorry - it means In Other Words.

<< Where can I see what version. I tried ABOUT. >>

It says so in the download name - if you're using the Unicode version you'll
see a "(Unicode)" at the end of the download name that you downloaded.

<< The problem is onthis line of code:
SQL.Text := 'SELECT * FROM Databases WHERE Name=' +
Engine.QuotedSQLStr('PersTAX');

It is as if the application does not want to assign something to SQL.Text
or anything with the "ConfigurationQuery" >>

And you didn't modify any of the example at all, correct ?

--
Tim Young
Elevate Software
www.elevatesoft.com

Tim,

<<Very peculiar.>>

I am dead serious. At home it works fine.

<<And you didn't modify any of the example at all, correct ?>>

No I did not change the example code. This line of code is from a new project I created. The example does not work on this PC at work (code unchanged).

<<It says so in the download name - if you're using the Unicode version you'll
see a "(Unicode)" at the end of the download name that you downloaded.>>

Ok. It's deffinitly not the "(Unicode)" version. Why does it work on my home PC?. (same install files)

Regards
Koos

Tim, all is fine now. I deleted the project I was busy on and created a new one from scratch and everything works 100% now.
Thanks for your help.

Regards
Koos
Image