This repository was archived by the owner on Jan 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLogWindow.cpp
More file actions
48 lines (43 loc) · 1.45 KB
/
LogWindow.cpp
File metadata and controls
48 lines (43 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "LogWindow.h"
#include "NDB.h"
#include "Delta_Net_Test.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm5 *Form5;
//---------------------------------------------------------------------------
__fastcall TForm5::TForm5(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm5::Image2Click(TObject *Sender)
{
if (CheckBox1->Checked)
{Form3->ShowModal(); Form4->Close(); Form5->Close(); }
else
{
Form4->ADConnection1->Connected=false;
Form4->ADConnection1->Params->BeginUpdate();
Form4->ADConnection1->Params->Clear();
Form4->ADConnection1->Params->Add("User_Name="+Edit1->Text);
Form4->ADConnection1->Params->Add("Password="+Edit2->Text);
Form4->ADConnection1->Params->Add("Database=NANA_sealevel");
Form4->ADConnection1->Params->Add("DriverID=MySQL"); //
Form4->ADConnection1->DriverName="MySQL";
Form4->ADConnection1->Params->EndUpdate();
try {
Form4->ADConnection1->Connected=true;
}
catch (...)
{
ShowMessage("Wrong login\\password combination!\nError: 3");
Application->Terminate();
}
Form4->Visible=true; Form5->Close();
}
}
//---------------------------------------------------------------------------