c# - SQLite injection with list of strings -


Can someone tell me that to prevent SQL injection on SQLite creating questions Where is a method where in the section a "myval IN (string_1, ..., string_n)" condition?

Although I'm dynamically creating and adding command text with annotations, is there an easy way to get those annotation parameters from the string list?

Thank you.

No, there is no easy way. Do not create a list of hazardous characters. Use the command with parameters. (Var command = conn.CreateCommand ()) (using conn.Open ()) using conv = new SQLiteconnection (connectionString)

  command. Command. Command Text: "Choose names from persons where id = @id"; Command. Parameter. Advant Value ("@ id", 5); {Reader.Read ()} {}}}  
while using Var reader = command.ExecuteReader ())

Comments

Popular posts from this blog

asp.net - Change the driver in the connection string to a data source in VB.Net -

objective c - iPhone and it's wireless area -

unix - Listing all shared memory segments used by a process on AIX5.3+ -