BDE and console applications? 
Author Message
 BDE and console applications?

Hi,

I know, this questions was answered some weeks before, but I couldn't read
the newsgroups some weeks, and therefore here the question again:

How can I use BDE database-access-routines in a console application without
any FORM??

Thanks to all they are able to help - thanks and greetings from Vienna /
Austria

Bye

Hartwig

--
----------------------------------------------------------------------------
-------------------------

 Weinberggasse 60/9/7, A-1190  Vienna/Austria/Europe



Tue, 19 Oct 1999 03:00:00 GMT
 BDE and console applications?

Quote:

> Hi,

> I know, this questions was answered some weeks before, but I couldn't read
> the newsgroups some weeks, and therefore here the question again:

> How can I use BDE database-access-routines in a console application without
> any FORM??

> Thanks to all they are able to help - thanks and greetings from Vienna /
> Austria

> Bye

> Hartwig

You have to USE all the right BDE stuff, then you can create all your
Queries and ttavbles in code... like this:

Function GetUserName(UserID:Integer):String;
var
        q:tQuery;
begin
        q:=tQuery.Create(Application)
        q.SQL.Add('Select FirstName, LastName');
        q.SQL.Add('From Users where ID = :USERIDPARAM');
        q.ParamByName('USERIDPARAM').AsInteger:=UserID;
        q.Open;
        result:=q.fieldbyname('Firstname').AsString+' '+
                q.fieldbyname('Lastname').AsString;
        q.Free;
end;

You can create any NON VISUAL database component and use it in your
code. Of course without a form, you'd never be able to use a tDBGrid, or
Tedit component...

--
--------------------------------------------
In theory, theory and practice are the same.
In practice, they are not.
--------------------------------------------
Bryan Valencia
Software Services - Making Windows Scream
WWW   : www.invsn.com/softserv/

--------------------------------------------



Tue, 19 Oct 1999 03:00:00 GMT
 
 [ 3 post ] 

 Relevant Pages 

1. Does the BDE work in Console Applications?

2. BDE in console apps

3. Application without BDE, but still BDE error?

4. Problem accessing dbase III+ files simultaneously with delphi BDE application and a Clipper application

5. Query interrupt in WIN32 console application

6. Using the MFC Database Classes in Console Applications

7. MSSQL server <-> Delphi console application

8. ODBC in a console application(C++) ?

9. Opening Excel or dBASE files in console application

10. CDatabase and console applications?

11. Console application and MFC DAO

12. Database Access from a console application


 
Powered by phpBB® Forum Software