Can I create a DLL in D1 to access a database 
Author Message
 Can I create a DLL in D1 to access a database

Hello,

I need to create a DLL with D1 that can access the database from a
calling application (also created with D1).

I have reviewed TI3105 'Synchronize a DLL to on Open Dataset'.  I have
tried the sample application and have come up with 'Cannot assign to a
read only property' when assigning the DB handle to the database handle
in the DLL.

function EditData(const DBHandle: HDBIDB; const DSHandle: HDBICur):
Boolean;
var
  DBEditForm: TDBEditForm;
begin
  DBEditForm := TDBEditForm.Create(Application);
  with DBEditForm do
  try
    Database1.Handle := DBHandle;
        << Cannot assign to a read only property >>
    TableClone := TTableClone.Create(DBEditForm);
    try
      TableClone.DatabaseName := 'DB1';
      DataSource1.DataSet := TableClone;
      TableClone.OpenClone(DSHandle);
      Result := (ShowModal = mrOK);
      if Result then
        begin
          TableClone.UpdateCursorPos;
          DbiSetToCursor(DSHandle, TableClone.Handle);
        end;
    finally
      TableClone.Free;
    end;
  finally
    Free;
  end;
end;

Can I, in D1, use the same connection used by the calling application?
If I can, what next? And if I can't, what are my other options.

TIA

Keith

Sent via Deja.com http://www.*-*-*.com/
Share what you know. Learn what you don't.



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Qe: creating dll with forms accessing database

2. D1: How to access an Access 2 database

3. Request help on creating D2 DLL forms for use in Access

4. Re : Using Access database files with d1

5. Using Access database files with d1

6. DLL database access causes another login !

7. Database access from a DLL

8. Database accessing in DLLs

9. Database access in DLL cause multiple login?

10. Using the Access Jet Database DLL

11. ACCESSING DELPHI DATABASE FEATURES FROM A DLL

12. DataBase Access DLL

 

 
Powered by phpBB® Forum Software