home *** CD-ROM | disk | FTP | other *** search
/ Chip 1997 April / Chip_1997-04_cd.bin / prezent / cb / data.z / CSDEMOS.CPP < prev    next >
C/C++ Source or Header  |  1997-01-16  |  2KB  |  58 lines

  1. //----------------------------------------------------------------------------
  2. //Borland C++ Builder
  3. //Copyright (c) 1987 Borland International Inc. All Rights Reserved.
  4. //----------------------------------------------------------------------------
  5. //  CSDEMOS
  6. //  Interbase Client Example
  7. //
  8. //  To run this app you need to create a BDE alias as follows,
  9. //
  10. //    1. Be sure Local Interbase and SQL Links are installed
  11. //    2. Run the BDE Configuration utility, BDECFG32.EXE
  12. //    3. Create a new Alias by the name 'IBLOCAL' of type INTRBASE
  13. //    4. Set the Server Name to <Interbase path>\EXAMPLES\EMPLOYEE.GDB
  14. //
  15. //---------------------------------------------------------------------------
  16. #include <vcl\vcl.h>
  17. #pragma hdrstop
  18. //---------------------------------------------------------------------------
  19. USEDATAMODULE("DMCSDEMO.CPP", DmEmployee);
  20. USEFORM("FRMEXESP.CPP", FrmExecProc);
  21. USEFORM("FRMMAIN.CPP", FrmLauncher);
  22. USEFORM("FRMQRYSP.CPP", FrmQueryProc);
  23. USEFORM("FRMTRANS.CPP", FrmTransDemo);
  24. USEFORM("FRMTRIGG.CPP", FrmTriggerDemo);
  25. USEFORM("FRMVIEWS.CPP", FrmViewDemo);
  26. //---------------------------------------------------------------------
  27. WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
  28. {
  29.   char buf[512];
  30.   try{
  31.     Application->Initialize();
  32.     Application->CreateForm(__classid(TFrmLauncher), &FrmLauncher);
  33.     Application->CreateForm(__classid(TFrmExecProc), &FrmExecProc);
  34.     Application->CreateForm(__classid(TFrmQueryProc), &FrmQueryProc);
  35.     Application->CreateForm(__classid(TFrmTransDemo), &FrmTransDemo);
  36.     Application->CreateForm(__classid(TFrmTriggerDemo), &FrmTriggerDemo);
  37.     Application->CreateForm(__classid(TFrmViewDemo), &FrmViewDemo);
  38.     Application->CreateForm(__classid(TDmEmployee), &DmEmployee);
  39.     Application->Run();
  40.   }
  41.   catch(EDatabaseError& e){
  42.     sprintf(buf,
  43.            "%s\n\n"
  44.            "1. Be sure Local Interbase and SQL Links are installed.\n"
  45.            "2. Run the BDE Configuration utility, BDECFG32.EXE.\n"
  46.            "3. Create a new Alias by the name 'IBLOCAL' of type INTRBASE.\n"
  47.            "4. Set the Server Name to <Interbase path>\\EXAMPLES\\EMPLOYEE.GDB.\n",
  48.            e.Message.c_str());
  49.  
  50.     ShowMessage(buf);
  51.   }
  52.   catch(Exception& e){
  53.     ShowMessage(e.Message);
  54.   }
  55.     return 0;
  56. }
  57. //---------------------------------------------------------------------------
  58.