public void LoadROIYPositions()
{
int module, posY;
var connectionString = new SqliteConnectionStringBuilder(/*baseConnectionString*/)
{
DataSource = Common.DataBase_Path + "config.db",
Mode = SqliteOpenMode.ReadOnly,
Password = m_pMainForm.DBPassword
}.ToString();
module = posY = 0;
using (var connection = new SqliteConnection(connectionString))
{
try
{
connection.Open();
var command = connection.CreateCommand();
command.CommandText =
@"
SELECT
MODULE_NO, VALUE
FROM roi_y_positions
ORDER BY MODULE_NO
";
using (var reader = command.ExecuteReader())
{
while (reader.Read())
{
module = reader.GetInt16(0);
posY = reader.GetInt16(1);
ROIs[module] = posY;
}
}
}
catch (SqliteException myException)
{
Common.GLog(LogLevel.ERROR, ClassName, "LoadROIYPositions Exception: " + myException);
}
}
}
이 소스로 암호화 되어있는 config.db파일을 사용중인데
connection.Open();
이부분에서 시간을 한 3초정도를 잡아먹는데 왜그럴까요?ㅠㅠ