I have something like this:
foo { a = 1, b = 2, c = 98,3 }
I generate the insert request dynamically, so in the end:
insert foos(a,b,c) (1, 2, 98,3)
Does anyone know how to do this?
The simple answer is: do not use text to insert values first. Use a parameterized SQL query.
- . , " " - . SQL - , , SQL . , SQL- .
, "" ( ) "SQL-", .
SQL, , , - .
SQL .ToString(CultureInfo.InvariantCulture), , TSQL.
.ToString(CultureInfo.InvariantCulture)
, , , .
Can't you just assign a value to something with. ??
Edit: using parameterized queries would be better. And a simple “replacement” will also help.
Source: https://habr.com/ru/post/1755670/More articles:How to install fonts on Windows and MAC using Silverlight? - fontsSplit Generic.Xaml - boot problem merges set. Please help with the source - wpfWhat is a product version? why does it change by chance? - firefoxStrange behavior in the Android "if" block - javaHow to prevent the next row from being highlighted in a datagridview every time you press the enter key? - c #Calculate time difference (hours of operation only) in minutes between two dates - sqlHow do you select versions from a specific branch in ClearCase? - clearcaseLINQ to SQL and SqlDependency - sqljavascript conflict - javascriptWhy roll up to Closeable first? - javaAll Articles