Questions tagged [idbcommand]

20 questions
6
votes
2 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,458
  • 6
  • 32
  • 58
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…
3
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
  • 1,950
  • 3
  • 26
  • 43
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…
ShinT
  • 971
  • 1
  • 13
  • 29
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
  • 8,522
  • 5
  • 49
  • 58
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
  • 81,082
  • 147
  • 410
  • 611
1
vote
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
  • 22,779
  • 27
  • 83
  • 163
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
  • 11,498
  • 11
  • 61
  • 92
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
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
  • 29,999
  • 21
  • 111
  • 199
0
votes
0 answers

.Net How to use commandtext instead of calling Stored proceduce and store it in a list with IDbConnection

I'm using stored procedures to get results from Sql database using IDbconnection. As an alternative of using stored procedures what are the other options to execute query inside the code? If I use stored procedure, each machine must have it and in…
user3094480
  • 35
  • 1
  • 8
1
2