Answer the question
In order to leave comments, you need to log in
Where can I find the created DB in SQLite Visual Studio?
using System;
using System.Data;
using Microsoft.Data.Sqlite;
using Telegram;
using Telegram.Bot;
using Telegram.Bot.Args;
using Telegram.Bot.Types;
using Telegram.Bot.Types.Enums;
using Telegram.Bot.Types.ReplyMarkups;
namespace TelegramSQLBotv2
{
class Program
{
static SqliteConnection connection = new SqliteConnection("Data Source=usersdata.db");
static TelegramBotClient client = new TelegramBotClient("");
static void Main(string[] args)
{
if (msg.Text == "/123")
{
connection.Open();
SqliteCommand command = new SqliteCommand();
command.Connection = connection;
command.CommandText = "CREATE TABLE MainDataBase(_id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE, User TEXT NULL)";
command.ExecuteNonQuery();
Console.WriteLine("Таблица MainDataBase создана");
}
}
}
Answer the question
In order to leave comments, you need to log in
if you do it in visual studio, then on the left there is a database browser
, all the databases to which the project was connected to appear there
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question