Questions tagged [oledbcommand]

Represents an SQL statement or stored procedure to execute against a data source using OLE DB provider.

451 questions
3
votes
2 answers

Query an Excel file with C#, issue with the numeric cells

I am querying an Excel file to retrieve data record and display them in a monitoring tool. The thing is that whenever I am trying to select a record with its id, with the following request, it throws an error when executing the query:…
Oflocet
  • 566
  • 3
  • 9
  • 19
2
votes
1 answer

OleDbDataAdapter.Update() with OleDbCommandBuilder

I am hitting an Oracle database using C# and OleDb, I have sucessfully pulled data from a query but I am unable to update the database using OleDbAdapter.Update(), my update code is below. ("Adapter" is a reference to the OleDbAdapter object used to…
Yends
  • 111
  • 3
  • 10
2
votes
4 answers

Does the OLEDB source task pass all the rows to the OLE DB Command task, and the OLE DB Command task processes one record at a time?

I have a data flow task with 2 components: OLEDB data source tasks that are a SELECT query: SELECT ACCOUNTID FROM JOBS WHERE STATUS=3 OLE DB Command task that does: DELETE FROM ACCOUNT WHERE ACCOUNTID=? The logic is that any job with status id…
variable
  • 8,262
  • 9
  • 95
  • 215
2
votes
0 answers

OleDbCommand create excel column name with bracket

I want to create excel file by oledb, and my code is int index = 0; foreach (DataColumn col in dt.Columns) { datatype[index] = $"[{col.ColumnName}]" + " String"; index++; } string query = string.Join(",", datatype); cmd.CommandText =…
DeAn
  • 23
  • 6
2
votes
2 answers

SSIS OLE DB SQL COMMAND - Getting return value from nested stored procedure

In SSIS I have an OLE DB SQL Command in my Dataflow that executes a stored procedure which in turn executes a 'nested' stored procedure (uspMyNestedSP). I can't seem to get the RETURN from the nested stored procedure. All SSIS returns is the int…
kevmull
  • 115
  • 1
  • 9
2
votes
1 answer

OLEDB error E_OUTOFMEMORY (0x8007000E) while trying to insert into Access Database from c#

I just wanted to post my question / solution to a deep problem we just encountered and solved. I didn't find any direct answer on the internet except a CLUE here : http://members.iiug.org/forums/ids/index.cgi/noframes/read/2476 Big picture, we…
Simon
  • 2,266
  • 1
  • 22
  • 24
2
votes
2 answers

OLEDB Command not generating a valid query

In my ASP.NET MVC application I have a form there the user can enter multiple texts. I want to save those inputs as OleDbCommand Parameters to generate a SQL Script. Unfortunately it's not working and I don't know why as I don't know what exact…
MarvinS
  • 84
  • 1
  • 11
2
votes
0 answers

How to use Windows Search Service on a local and on a remote machine both?

I am working on a C# WPF project which can search files on specified directory paths. These paths can be on a local and on a remote machine as well, so I have to solve it on both. At first I tried to use a query which has a local path, but the…
Christian
  • 105
  • 1
  • 6
2
votes
1 answer

Trying To Make Update From Database GridView Specific User (OleDbCommand)

Hey guys i am working about users GridView Database Upade, And i have a problem with my Update Row, Its telling me when i click on update, The Row is updated Succes but its not really updating it :( Codes: 1 Asp.net(OleDB) protected void…
Alex
  • 29
  • 5
2
votes
4 answers

Why am I getting this error when trying to update an Access Database file (.mdb) with a Datatable:

I've been working on my issue for 30 hours. Each time I fix one thing a new error arises. All I want to do is take a DataTables from memory and simply update an Access .MDB file. Here is my code: using System; using System.Collections.Generic; using…
OneShot
  • 609
  • 8
  • 20
  • 32
2
votes
0 answers

SSIS - Pass variable in OleDB Command (Row Sampling to Update Existing Row)

In OleDB command, how to pass the variable to update the table? I wanna use SSIS to load big volume of testing data, the file name and code are unique, but the other details could be repetitive (so I use row sampling to get the sample data). Table:…
Nel
  • 63
  • 2
  • 9
2
votes
1 answer

Share a database connection for multiple queries in Excel?

I have a workbook (Excel 2016) with a few dozen "Connections" defined. Each connection has different "Command Text" but the exact same Connection String. Because this connection string will be changing often (monthly password changes or the…
jimo3
  • 408
  • 1
  • 5
  • 17
2
votes
2 answers

Importing from Excel - Header is not on row 1

Is there some simple way I am missing to import an Excel worksheet into a datatable using an OleDBConnection and change what row the header is located on? I have HDR=YES in my connection string and that works great when header is on row 1 but the…
novacara
  • 2,207
  • 4
  • 24
  • 34
2
votes
0 answers

OleDb Command for CSV with Date in FileName causes Microsoft Jet database engine could not find the object

One of my customers has found a problem and I am quietly confident it is a bug, but I can't find any official documentation. The error is: The Microsoft Jet database engine could not find the object 'Trades 23.11.177.csv' Here is the code to…
Jeremy Thompson
  • 61,933
  • 36
  • 195
  • 321
2
votes
1 answer

C# Oledb update data in application

So i have got a form in which there are two sections one to add and one to delete. But the problem is when i add data and after which when i check the combobox associated with delete section i can see all previous data except the one which i just…
Danial Ahmed
  • 856
  • 1
  • 10
  • 26
1 2
3
30 31