SQLite Parameters
cmd.Parameters.AddWithValue("@name", "BMW");
cmd.Parameters.AddWithValue("@price", 36600);
cmd.Prepare();
SQLite Parameters
cmd.Parameters.AddWithValue("@name", "BMW");
cmd.Parameters.AddWithValue("@price", 36600);
cmd.Prepare();
SQLite Parameters
using System;
using System.Data.SQLite;
string cs = @"URI=file:C:\Users\Jano\Documents\test.db";
using var con = new SQLiteConnection(cs);
con.Open();
using var cmd = new SQLiteCommand(con);
cmd.CommandText = "INSERT INTO cars(name, price) VALUES(@name, @price)";
cmd.Parameters.AddWithValue("@name", "BMW");
cmd.Parameters.AddWithValue("@price", 36600);
cmd.Prepare();
cmd.ExecuteNonQuery();
Console.WriteLine("row inserted");
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us