If I add unnamed parameters to my SqlCommand , how to set parameter values ββto SqlCommand?
SqlCommand
I have no problem when I use named parameters where I can just do SqlCommand.Parameters.AddWithValue() .
SqlCommand.Parameters.AddWithValue()
Example:
Select * from sometable where SomeValue=? and AnotherValue=?
With ADO.NET vs SQL Server, Can't You Use Those ? for parameters - you always need to use the @paramName approach.
?
@paramName
? for unnamed parameters is ODBC "left", but not supported in ADO.NET when using SQL Server (not sure about MS-Access)
Use ADODBConnection and ADODBCommand instead of SQL versions.
Source: https://habr.com/ru/post/1391617/More articles:.net to draw a triple chart? - c #Automatically add github release number to all commits - gitCatching MatchError on val initialization matching patterns in Scala? - scalaJQuery: how to get one class without .split () - jqueryHow to install Sphinx on LINUX (ubuntu) - sphinxHow to optimize the ViewState generated by the GridView and save some functions related to the GridView - c #Implementing UIScrollView programmatically - iosSubmitting a form using jQuery - jqueryhow to overwrite the built-in method of javascript native objects - javascripterror MSB4064: parameter "OverwriteReadOnlyFiles" is not supported by the task "Copy" - msbuildAll Articles