C# 使用 SQLite 插入数据
"using (SQLiteConnection connection = new SQLiteConnection(connectionString))\n{\n connection.Open();\n \n string insertDataQuery = $"INSERT INTO {tableName} (column1, column2) VALUES (@param1, @param2)";\n using (SQLiteCommand command = new SQLiteCommand(insertDataQuery, connection))\n {\n command.Parameters.AddWithValue(@param1, "value1");\n command.Parameters.AddWithValue(@param2, "value2");\n command.ExecuteNonQuery();\n }\n}
原文地址: https://www.cveoy.top/t/topic/pEce 著作权归作者所有。请勿转载和采集!