언어 설정

Menu
Sites
Language
Database Construct deprecated in 2.2b

The API checker says that this method is deprecated in 2,2b but the help document says it is not

String dbName = App::GetInstance()->GetAppDataPath() + L"sample.db");

pDatabase = new Database();

r = pDatabase->Construct(dbName, "a+");  //deprecated
 

What is the alternative for this method in sdk 2.2b?

Edited by: Brock Boland on 17 3월, 2014 Reason: Paragraph tags added automatically from tizen_format_fix module.

Responses

3 댓글
Pushpa G
Hi, When i ran the APi checker, it dint show as deprecated. However, when checked in help it says : result Tizen::Io::Database::Construct(const Tizen::Base::String &dbPath,bool createIfNotExist) Deprecated:This method is deprecated. Instead of using this method, use Directory::Create(const Tizen::Base::String &dirPath, bool createParentDirectories=false) and Database::Construct(const Tizen::Base::String& dbPath, const Tizen::Base::String& openMode). Hence its better you use as follows: String dbName = App::GetInstance()->GetAppDataPath() + L"sample.db"; String dbName1 = App::GetInstance()->GetAppDataPath()+L""; pDatabase = new Database(); Directory::Create(dbName1, false); r = pDatabase->Construct(dbName,"a+");
no, it shows deprecated warning .. I copied your code This method does not exists Database::Construct(const Tizen::Base::String& dbPath, const Tizen::Base::String& openMode); Instead of (const Tizen::Base::String& openMode) there is (const char* openMode) and it says it is deprecated I think it is a bug... needs to be solved in official 2.2
Already resolved in SDK RC version. I used 2.2b