#!/usr/bin/perl

use lib 'd:/Programs/Perl/lib';
use lib 'd:/Programs/Perl/lib2.0';
use strict;
#use warnings;
use TestApp;

#===============================================
# Applicationオブジェクト作成
#===============================================
my $App = new TestApp();
my %Arg = $App->ReadArgs(0, 0);

#==========================================
# メイン関数スタート
#==========================================
my $Level = $App->GetLogonLevel($Arg{Account}, $Arg{Password}, 1);
exit if($Level <= 0);

my $DB = $App->OpenDB("auto", 1);
exit if(!defined $DB or !$DB->dbh());
#$App->print("DBConfigName: ", $DB->{DBConfigName}, "\n");

&Execute();

$DB->Close();

exit;
#===============================================
# スクリプト終了
#===============================================

#==========================================
# &Subroutines
#==========================================
sub Execute {
	$App->H2("Execute");
	$DB->Search("order by sn desc", "sn");
	my $nHit = $DB->nHit();
	$App->print("$nHit found.\n");
}
