diff options
author | unknown <monty@hundin.mysql.fi> | 2002-06-28 17:26:11 +0300 |
---|---|---|
committer | unknown <monty@hundin.mysql.fi> | 2002-06-28 17:26:11 +0300 |
commit | b3574dc24d434092d638ccd889861a969cb0f36a (patch) | |
tree | 27f0f967ee5f642c6cb7ecfab977612a3d7e57d3 /VC++Files/winmysqladmin/db.cpp | |
parent | e00877807719dac0eaba1447f5fdf01c9dc3dfd9 (diff) | |
download | mariadb-git-b3574dc24d434092d638ccd889861a969cb0f36a.tar.gz |
Updated windows files (VC++ files and winmysqladmin).
Portability fixes.
Removed compiler warnings.
VC++Files/client/mysql.dsp:
Updated to 4.0.2
VC++Files/client/mysqladmin.dsp:
Updated to 4.0.2
VC++Files/client/mysqlclient.dsp:
Updated to 4.0.2
VC++Files/client/mysqldump.dsp:
Updated to 4.0.2
VC++Files/client/mysqlimport.dsp:
Updated to 4.0.2
VC++Files/client/mysqlshow.dsp:
Updated to 4.0.2
VC++Files/innobase/innobase.dsp:
Updated to 4.0.2
VC++Files/libmysql/libmySQL.dsp:
Updated to 4.0.2
VC++Files/libmysqltest/myTest.dsp:
Updated to 4.0.2
VC++Files/merge/merge.dsp:
Updated to 4.0.2
VC++Files/myisam/myisam.dsp:
Updated to 4.0.2
VC++Files/mysql.dsw:
Updated to 4.0.2
VC++Files/mysqlbinlog/mysqlbinlog.dsp:
Updated to 4.0.2
VC++Files/mysqlcheck/mysqlcheck.dsp:
Updated to 4.0.2
VC++Files/mysqlmanager/MySqlManager.dsp:
Updated to 4.0.2
VC++Files/mysys/mysys.dsp:
Updated to 4.0.2
VC++Files/pack_isam/pack_isam.dsp:
Updated to 4.0.2
VC++Files/perror/perror.dsp:
Updated to 4.0.2
VC++Files/replace/replace.dsp:
Updated to 4.0.2
VC++Files/sql/mysqld.dsp:
Updated to 4.0.2
VC++Files/test1/test1.dsp:
Updated to 4.0.2
VC++Files/thr_insert_test/thr_insert_test.dsp:
Updated to 4.0.2
VC++Files/thr_test/thr_test.dsp:
Updated to 4.0.2
VC++Files/vio/vio.dsp:
Updated to 4.0.2
VC++Files/zlib/zlib.dsp:
Updated to 4.0.2
include/config-win.h:
Added isnan() and finite()
include/myisam.h:
Move thr_xxx functions to myisam_priv.h
myisam/mi_check.c:
Portability fix.
myisam/mi_locking.c:
Comment cleanup
myisam/myisamchk.c:
Removed compiler warning
myisam/myisamdef.h:
Added thr_xxx functions
myisam/sort.c:
Portability fix
sql/field.cc:
Portability fix
sql/sql_insert.cc:
R
Diffstat (limited to 'VC++Files/winmysqladmin/db.cpp')
-rw-r--r-- | VC++Files/winmysqladmin/db.cpp | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/VC++Files/winmysqladmin/db.cpp b/VC++Files/winmysqladmin/db.cpp new file mode 100644 index 00000000000..6e796856a7e --- /dev/null +++ b/VC++Files/winmysqladmin/db.cpp @@ -0,0 +1,80 @@ +//---------------------------------------------------------------------------
+#include <vcl.h>
+#pragma hdrstop
+
+#include "db.h"
+#include "main.h"
+//---------------------------------------------------------------------------
+#pragma package(smart_init)
+#pragma resource "*.dfm"
+Tdbfrm *dbfrm;
+//---------------------------------------------------------------------------
+__fastcall Tdbfrm::Tdbfrm(TComponent* Owner)
+ : TForm(Owner)
+{
+}
+//---------------------------------------------------------------------------
+void __fastcall Tdbfrm::SpeedButton2Click(TObject *Sender)
+{
+ Close();
+}
+//---------------------------------------------------------------------------
+void __fastcall Tdbfrm::SpeedButton1Click(TObject *Sender)
+{
+ if (VerDBName())
+ {
+ if (!Form1->CreatingDB())
+ {
+ Form1->OutRefresh();
+ Edit1->Text = "";
+ Application->MessageBox("The database was created", "WinMySQLadmin 1.0", MB_OK |MB_ICONINFORMATION);
+ }
+ }
+
+
+
+
+
+}
+//---------------------------------------------------------------------------
+bool __fastcall Tdbfrm::VerDBName()
+{
+ String temp = Edit1->Text;
+ if (Edit1->Text.IsEmpty())
+ {
+ Application->MessageBox("The name of the Database is Empty", "WinMySQLadmin 1.0", MB_OK |MB_ICONINFORMATION);
+ return false;
+ }
+
+ if (temp.Length() > 64)
+ {
+ Application->MessageBox("The name of the Database can't have more than 64 characters ", "WinMySQLadmin 1.0", MB_OK |MB_ICONINFORMATION);
+ return false;
+ }
+
+ for (int j = 1; j <= temp.Length(); j++)
+ {
+ if (temp[j] == ' ')
+ {
+ Application->MessageBox("The name of the Database can't have blank spaces ", "WinMySQLadmin 1.0", MB_OK |MB_ICONINFORMATION);
+ return false;
+ }
+ else if (temp[j] == '/')
+ {
+ Application->MessageBox("The name of the Database can't have frontslash (/)", "WinMySQLadmin 1.0", MB_OK |MB_ICONINFORMATION);
+ return false;
+ }
+ else if (temp[j] == '\\')
+ {
+ Application->MessageBox("The name of the Database can't have backslash (\\)", "WinMySQLadmin 1.0", MB_OK |MB_ICONINFORMATION);
+ return false;
+ }
+ else if (temp[j] == '.')
+ {
+ Application->MessageBox("The name of the Database can't have periods", "WinMySQLadmin 1.0", MB_OK |MB_ICONINFORMATION);
+ return false;
+ }
+ }
+ return true;
+}
+//---------------------------------------------------------------------------
|