Board index » delphi » DEBUG Error: Could Not Find ISAM ?

DEBUG Error: Could Not Find ISAM ?

I am trying to write some code that will open an Access database and read the contents of a table then populate a DBGrid.
When I go to RUN the program I get the following error:

"Project XYZ.exe raised exception class EOLeException with message: 'Could not find installable ISAM' Process stopped."

The code I am using is shown below - can anyone point out what I have done wrong ?

Regards Pete.

procedure TMainForm.Button_VimsDatabaseClick(Sender: TObject);
var
   ConStr: string;

begin
     if OpenDialog.Execute then
        VimsDatabase := OpenDialog.FileName;

        DBGrid.DataSource := DataSource;
        DataSource.DataSet := ADOTable;
        ADOTable.Connection := ADOConnection;
        ConStr := 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=' + VimsDatabase + ';Persist Securiry Info=False';
        ADOConnection.ConnectionString := ConStr;
        ADOConnection.LoginPrompt := false;
        ADOTable.TableName := 'MACHINE';
        ADOTable.Active := true;
        StatusBar.SimpleText := VimsDatabase;
     end;

end.

 

Re:DEBUG Error: Could Not Find ISAM ?


Try delete

ADOTable.Connection := ADOConnection;

if you have a Connectionstring you do not need a conObject

regards
Michael

Quote

>procedure TMainForm.Button_VimsDatabaseClick(Sender: TObject);
>var
>   ConStr: string;

>begin
>     if OpenDialog.Execute then
>        VimsDatabase := OpenDialog.FileName;

>        DBGrid.DataSource := DataSource;
>        DataSource.DataSet := ADOTable;
>        ADOTable.Connection := ADOConnection;
>        ConStr := 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=' + VimsDatabase + >';Persist Securiry Info=False';
>        ADOConnection.ConnectionString := ConStr;
>        ADOConnection.LoginPrompt := false;
>        ADOTable.TableName := 'MACHINE';
>        ADOTable.Active := true;
>        StatusBar.SimpleText := VimsDatabase;
>     end;

>end.

Re:DEBUG Error: Could Not Find ISAM ?


G'Day Michael,

Hmmm,  I'm confused.

If I delete 'ADOTable.Connection := ADOConnection', what links the ADOTable to the ADOConnection objects ?

Yes, I have defined a ADOConnection.ConnectionString as you may find in the code below.

Pete

Quote
"Michael Vimetal" <m...@viscom-online.com> wrote:
>Try delete

>ADOTable.Connection := ADOConnection;

>if you have a Connectionstring you do not need a conObject

>regards
>Michael

>>procedure TMainForm.Button_VimsDatabaseClick(Sender: TObject);
>>var
>>   ConStr: string;

>>begin
>>     if OpenDialog.Execute then
>>        VimsDatabase := OpenDialog.FileName;

>>        DBGrid.DataSource := DataSource;
>>        DataSource.DataSet := ADOTable;
>>        ADOTable.Connection := ADOConnection;
>>        ConStr := 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=' + VimsDatabase + >';Persist Securiry Info=False';
>>        ADOConnection.ConnectionString := ConStr;
>>        ADOConnection.LoginPrompt := false;
>>        ADOTable.TableName := 'MACHINE';
>>        ADOTable.Active := true;
>>        StatusBar.SimpleText := VimsDatabase;
>>     end;

>>end.

Re:DEBUG Error: Could Not Find ISAM ?


Hi Pete

you can either use a ConnectionObject or a ConnectionString. Try it with the object
inspector.
Put a adoTable with a ConnString and ConnObj on the form. When you assign the Table
the ConnObj the ConnString is deleted and vice versa. You do not need a ConnObj to
open a table per se. You can use it for transactions or when you have more than one
table to connect to a DB it is easier because you do not have to define the connection
string for each table or query.

And if you use a connection object you have to assign the object a connection string.

and I had a look at our connstring, there are some errors - maybe just in this mail but:
Securiry <> Security

Regards

Michael

Quote

>G'Day Michael,

>Hmmm,  I'm confused.

>If I delete 'ADOTable.Connection := ADOConnection', what links the ADOTable to the
>ADOConnection objects ?

>Yes, I have defined a ADOConnection.ConnectionString as you may find in the code
below.

>Pete

>"Michael Vimetal" <m...@viscom-online.com> wrote:
>>Try delete

>>ADOTable.Connection := ADOConnection;

>>if you have a Connectionstring you do not need a conObject

>>regards
>>Michael

>>>procedure TMainForm.Button_VimsDatabaseClick(Sender: TObject);
>>>var
>>>   ConStr: string;

>>>begin
>>>     if OpenDialog.Execute then
>>>        VimsDatabase := OpenDialog.FileName;

>>>        DBGrid.DataSource := DataSource;
>>>        DataSource.DataSet := ADOTable;
>>>        ADOTable.Connection := ADOConnection;
>>>        ConStr := 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=' + VimsDatabase +
>';Persist >Securiry Info=False';
>>>        ADOConnection.ConnectionString := ConStr;
>>>        ADOConnection.LoginPrompt := false;
>>>        ADOTable.TableName := 'MACHINE';
>>>        ADOTable.Active := true;
>>>        StatusBar.SimpleText := VimsDatabase;
>>>     end;

>>>end.

Re:DEBUG Error: Could Not Find ISAM ?


Hi Mikeael,

Thanks heaps for that - I will have a play and see if I can thing to start to talk.....

Best Regards
Pete

Quote
"Michael Vimetal" <m...@viscom-online.com> wrote:
>Hi Pete

>you can either use a ConnectionObject or a ConnectionString. Try it with the object
>inspector.
>Put a adoTable with a ConnString and ConnObj on the form. When you assign the Table
>the ConnObj the ConnString is deleted and vice versa. You do not need a ConnObj to
>open a table per se. You can use it for transactions or when you have more than one
>table to connect to a DB it is easier because you do not have to define the connection
>string for each table or query.

>And if you use a connection object you have to assign the object a connection string.

>and I had a look at our connstring, there are some errors - maybe just in this mail but:
>Securiry <> Security

>Regards

>Michael

>>G'Day Michael,

>>Hmmm,  I'm confused.

>>If I delete 'ADOTable.Connection := ADOConnection', what links the ADOTable to the
>>ADOConnection objects ?

>>Yes, I have defined a ADOConnection.ConnectionString as you may find in the code
>below.

>>Pete

>>"Michael Vimetal" <m...@viscom-online.com> wrote:
>>>Try delete

>>>ADOTable.Connection := ADOConnection;

>>>if you have a Connectionstring you do not need a conObject

>>>regards
>>>Michael

>>>>procedure TMainForm.Button_VimsDatabaseClick(Sender: TObject);
>>>>var
>>>>   ConStr: string;

>>>>begin
>>>>     if OpenDialog.Execute then
>>>>        VimsDatabase := OpenDialog.FileName;

>>>>        DBGrid.DataSource := DataSource;
>>>>        DataSource.DataSet := ADOTable;
>>>>        ADOTable.Connection := ADOConnection;
>>>>        ConStr := 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=' + VimsDatabase +
>>';Persist >Securiry Info=False';
>>>>        ADOConnection.ConnectionString := ConStr;
>>>>        ADOConnection.LoginPrompt := false;
>>>>        ADOTable.TableName := 'MACHINE';
>>>>        ADOTable.Active := true;
>>>>        StatusBar.SimpleText := VimsDatabase;
>>>>     end;

>>>>end.

Other Threads