Questions tagged [idbcommand]

21 questions
6
votes
3 answers

eclipse with Intel Fortran debugger

My problem is the following: I want to use the idb intel debugger with eclipse to be able to go step by step through my code, much like idb -gui does. I already tried to implement a solution i found where i replace the direct call to idb -gdb with a…
tarrasch
  • 2,630
  • 8
  • 37
  • 61
4
votes
1 answer

How do I get an DataTable from IDataReader?

I'm trying to get a DataTable or DataSet from an IDataReader, but I'm failing. Here's the code: string sql = @"SELECT ID, DOCNUMBER FROM TBDOCUMENT"; using (IDbConnection conn = CreateConnection(provider, connectionString)) { …
Guilherme Oliveira
  • 2,008
  • 3
  • 27
  • 44
4
votes
2 answers

Async functionality missing from the IDbCommand interface

Is this a reasonable way to add async functionality to the IDbCommand interface? public async static Task ExecuteReaderAsync(this IDbCommand self) { DbCommand dbCommand = self as DbCommand; if (dbCommand != null) { …
Jean Lord
  • 71
  • 4
4
votes
1 answer

How to call a stored proc using a generic DB connection in C#?

I have to call stored procs in C# (.Net 2.0) sometimes using an ODBC connection, sometime with SQLClient. I the future we could have to communicate with Oracle as well. My stored procedures have input/output parameters and a return value. CREATE…
TBR
  • 77
  • 1
  • 7
2
votes
1 answer

CommandBehavior.SchemaOnly fails for some stored procedures

Making an ADO.NET call to run a stored procedure using IDbCommand.ExecuteReader(SchemaOnly) and it throws an exception if the stored procedure uses a temp table. The exception is "Invalid object name '#tempPCBBHolidays'." (that's the name of the…
David Thielen
  • 28,723
  • 34
  • 119
  • 193
2
votes
0 answers

Why is the SELECT results different between SQL Query and DbDataReader Read()

In my code I am trying to CREATE INDEX in my code, and since CREATING duplicated INDEX is not allowed, I wanted to check if my INDEX existed in my SQL CE Database. In C# code, I ran the query using IDbCommand with query "SELECT * FROM…
Shintaro Takechi
  • 1,215
  • 1
  • 17
  • 39
1
vote
2 answers

Is there a way to use a generic DbCommand to do an Asynchronous update?

When using a generic DbCommand to perform an update, it will hang indefinately if the row being updated is locked. The underlying connection used is is Devart's Oracle provider, Devart.Data.Oracle.OracleConnection Setting the…
vzczc
  • 9,270
  • 5
  • 52
  • 61
1
vote
4 answers

How to obtain the IDbCommand output to the DB? (.NET)

I have a SqlCommand object, and I execute its ExecuteNonQuery method. The query fails, but I can't see how to obtain the query to debug it. Could you help me? Update I am currently using Wireshark (tcpdump) to read the command, but I think that its…
Jader Dias
  • 88,211
  • 155
  • 421
  • 625
1
vote
1 answer

EF on IDBcommandInterceptor and DBDataReader

I am trying to Mock EF on IDBcommandInterceptor For insert / update operations it is enough simple - I can return a DbDataReader made of a single field or an int However, for select operations, if there are some "include", then the shape of the sql…
1
vote
1 answer

Select Statement in ASP.NET (VB) using Parameters - Error: Input string was not in a correct format

So I have some code in a VB module. When I run this with the SQL statement having hard coded values in the where statement it works. I am now trying to add Parameters to the module so that the Form can except an Input from a user, but I am getting…
Iskevosi
  • 11
  • 2
1
vote
4 answers

SQL Server Physical Memory Grow After Execution of Commands

I am running Server Application on Windows Server 2008 with SQL Server 2008, Now My scenario is as Given. I have implemented a custom Connection Pooling (why I did that its another long story). therefore I am not opening or closing connection on…
Mubashar
  • 12,300
  • 11
  • 66
  • 95
1
vote
1 answer

Db2 function call with IDBCommand

i have trouble calling a function from VB with IDBcommand which returns a integer value param1 = dbfactory.CreateParameter("param1", DbType.AnsiString) param1.Value = sIban param1.Direction = ParameterDirection.Input …
Samo
  • 11
  • 1
0
votes
0 answers

Snowflake - .Net Parameterized bulk insertion splits the strings containing commas into different columns

''' IDbCommand cmd = conn.CreateCommand(); var query = ($"Insert into table1 (c1, c2, c3, c4, " + $"c5, c6, c7, c8, c9, c10, c11, c12, c13," + $"c14, c15, c16, c17, c18, c19, " + $"c20, c21, c22, c23, c24, c25, c26)"…
0
votes
1 answer

SQL: Update does not affect any row

I want to update a dataset in a DB2/AS400 table. The problem is if I there is string parameter in the parameters list the command does not find a row to update. For example: If I run the command only with the company number the command will succeed.…
Gerald
  • 1
  • 1
0
votes
2 answers

IDbCommand - CommandType.StoredProcedure

I'm just curious if the IDbCommand.CommandType's value makes a difference in terms of performance? Basically, I could do either set it as CommandType.Text and pass in a SQL query "EXEC sp_my_stored_procedure ..." as the CommandText. Or, I could set…
myermian
  • 31,823
  • 24
  • 123
  • 215
1
2