|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
Returning Identity Column using ExecuteScalar Method
Returning Identity Column using ExecuteScalar Method
Jun 8, 2003 - The ExecuteScalar method returns only the first column and first result of a query, the rest is ignored. The meaning of this article is to describe the most efficient way of JUST returning one value to the aspx page. I ran into no problems using the ExecuteNonQuery method but again just looking for the fastest and most efficient method. Live demo and downloadable code! Please discuss this article in this thread. You can read the article here . |
|
#2
|
|||
|
|||
|
It looks very much to me like you've missed the point of using ExecuteScalar. This method returns a value, but you're just using output parameters and not collecting the ExecuteScalar return value. You could replace ExecuteScalr in this code with ExecuteNonQuery and nothing would change.
|
|
#3
|
||||
|
||||
|
Point well made.
|
![]() |
| Viewing: ASP Free Forums > Other > Development Articles > Returning Identity Column using ExecuteScalar Method |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|