dbcommand Questions
7
If I have a DbCommand defined to execute something like:
SELECT Column1 FROM Table1
What is the best way to generate a List<String> of the returned records?
No Linq etc. as I am using VS2...
Eachelle asked 19/8, 2012 at 4:29
3
Solved
I use System.Data.Common.DbCommand to insert a new row to database. The point is, that this row already exists.
try
{
[...]
DbCommand insertCommand = [...]
insertCommand.ExecuteScalar();
[...]...
Jarid asked 10/3, 2015 at 10:34
3
Periodically, I get this error message while making a call to a DB2 database using the Odbc connection string. I have tried setting the CommandTimeout of the DbCommand object to multiple values, bu...
6
Solved
How do you copy DbCommand parameters to another DbCommand, I want a new DbCommand with the same parameters as my last DbCommand. But now with a different sql string.
Witchhunt asked 24/1, 2011 at 4:53
4
Solved
DbParameter param = comm.CreateParameter();
param = comm.CreateParameter();
param.ParameterName = "@StaffId";
if (!string.IsNullOrEmpty(activity.StaffId))
param.Value = activity.StaffId;
para...
3
Solved
I was debugging a database operation code and I found that proper UPDATE was never happening though the code never failed as such. This is the code:
condb.Open();
OleDbCommand dbcom = new OleDb...
Seraph asked 23/8, 2011 at 18:16
3
Solved
I know this is not a hell of an useful question but I can't help being bugged by it.
So,
Why said method (in *Command classes) is called
ExecuteNonQuery instead of ExecuteQuery?
Aren't those SQL ...
Beverie asked 14/5, 2010 at 12:26
1
© 2022 - 2024 — McMap. All rights reserved.