Hello,
i don't intend to create a sql server project in fact i need a very simple database with only 1 table.
Depending on your needs, creating a database using Android's built-in SQLlite engine will be a better choice.
You could refer to the following documentation and code sample:
Although the above sample code was created early, the section on database operations is still available.
You could refer to the code in the ORM
section to build your own database in your project, and save and query the database in the following way.
Stock s = new Stock();
s.Id = 0;
s.Name = "test";
s.Symbol = "test";
// save
StockRepository.SaveStock(s);
// get all items from database.
var list = StockRepository.GetStocks();
Best Regards,
Alec Liu.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.