oledb

Is there a way to force Microsoft.Jet.OLEDB to get date Columns in MM/DD/YYYY format from Excel?

Hi, I am having a problem with reading DateColumns from an excel sheet. Sometimes people use different date Formats and this brings a problem. Let's say when I expect 07/26/2010 from an Excel column I get "26-Jul-2010" because the user has changed its date format. I use Microsoft.Jet.OLEDB for reading the xls sheet into a DataTable. ...

How do I connect to different versions of Excel from C#?

I have a program that imports data from Excel into a dataset. To connect to Excel I use the following code... return new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;" + "Data Source=" + fileName + "; Jet OLEDB:Engine Type=5;"+ "Extended Properties=\"Excel 8.0;\""); I just got a new computer with Excel 2010 and now the connectio...

Are Hierarchical Rowsets supported by JET and SQL Server?

The OLE DB documentation documents a hierarchial rowset feature, with SQL examples, but doesn't indicate what DB providers support it. Do JET and SQL Server support this feature? And do they use the same sort of syntax as in the documentation, or their own extended syntax? ...

Numeric field width in DBF file inconsistent when created with oleDB (.NET)

OleDB always add one more digit to DBF numeric fields when we create them. A command like this: CREATE TABLE [file1.DBF] ( [MY_FIELD] NUMERIC(1,0) NULL) will create a field that can contains 2 digits (or one digit and a minus sign). What's funny is that I can ask for a length of zero like this NUMERIC(0,0) and it's going to create a fiel...

Error while connecting to the Oracle Data Base

Hi All, This is the exception I am getting while trying to connect to an oracle database. This is not happening all the time. If you can help me out with this..it wil be great. System.Data.OleDb.OleDbConnectionInternal ..ctor(OleDbConnectionString constr, OleDbConnection connection) at System.Data.OleDb.OleDbConnectionFactor...

Is there a way to connect to an ASA database with Powerbuilder without deploying the ODBC or OLEDB drivers?

What I want is a Powerbuilder application that runs on Windows that runs from a CD (or some other external disk) that can read from an ASA database whose file is located on the same disk. But I want to do so without deploying the ODBC or OLEDB drivers. That is, I do not want to have to copy the driver files to the client's hard disk or...

Convert method to parametrized query?

Hello fellows, I want to make a generalized method to fetch sequences for my application (OLEDB asp.net DB2) var seqName="Table1"; string query="SELECT NEXTVAL FOR SchemaName."+seqName+" as seqid FROM sysibm.sysdummy1"; using (OleDbCommand myCommand=new OleDbCommand(query,myConnection)) { ...

How to update SQL table with CSV data?

I am trying to update one of my SQL tables with new columns in my source CSV file. These CSV records in this file are already in my SQL table, but they are lacking some of the columns from this CSV file. I already added the new columns to my SQL table. But now I just need to import the data from the new columns. How can I do this b...

Problem using oledb datatypes to write data to excel sheet

hi everyone, I am trying insert some data into excel sheet using oledb dataadapter which is obtained from MYSQL Db.This data obtained from mysql db contains very long texts whose datatypes in MYSQL have been defined as(Varchar(1023),Text,Longtext etc).When I try to pass these to the oledb Dataadapter I tried to use oledb.VarWChar,oledb....

Oracle connection prioritizer

Maybe that will sound odd, but I need to schedule priority on oracle connections. It goes like that: I have one main 'connection' that will pump data out of oracle, and it should be as fast as it can be. I have two other connections that should (ideally) use all oracle resources not dedicated to the first query. Is there a way to do ...

Correct this SQL Query: error "Microsoft Jet database engine cannot find the input table or query 'IF' "

Hi every one, i should say hi experts :D . Help me with this pretty code :) The database: "ID (Primary key)" | "Title" 0 | "title1" 1 | "title2" 2 | "title3" 3 | "title4" Sub AddRecord(ByVal Table As String, ByVal Columns As String, ByVal Record() As String) D...

What are the differences between using OLEDB and ODP.NET to connect to an Oracle database?

I have two small VB.NET applications that connect to the same Oracle database. One uses the OLEDB provider, and the other uses Oracle's ODP.NET. Should I expect to see problems with the OLEDB provider, as it's less 'native' to Oracle? Thanks for any help! ...

What other standards are for Database Connection?

I'm doing a research for a homework, but I don't seem to find any other standard way to connect to a database, so far I've found this two: ole db odbc I've also found jdbc, but that's java only, as ado.net or pdo. I would like some help or advice links or books would be greatly appreciared. :D ...

OleDbPermission and ASP.NET medium trust

Hi, I'm following this document in order to run my website in a medium trust environment. My web app uses OleDb, so I need to give it permission in medium trust. I've done everything that is in that article and it's still not working :( In my web_mediumtrust.config I've added the following security class: <SecurityClass Name="OleDbPer...

Insert carriage returns in Excel via OleDb c#

I am inserting text into a Memo field in a Excel cell via a insert statement using OleDb command object. When I try to insert a carriage return, char 10, what is displayed is a black square (MS Sans Serif). When I look at the top edit cell (don't know the offical name) the text is formatted correctly with carriage returns. I am trying...

Insert problem in oracle database

HRESULT: 0X80040E2F (DB_E_INTEGRITYVIOLATION) Error message: Value violated the integrity constraints for a column or table. Can anybody tell me how to solve this error. ...

Debugging "Multiple-step OLE DB operation generated errors."

This is kinda a general question, looking for as much info as possible. I have code which generates this error (the define is DB_E_ERRORSOCCURRED), and I'm looking for the best methods to debug it (eg: figure out what the particular errors were). I'm aware that there are some other SO questions related this this error (eg: here, here, he...

Sql server vs MS Access performance

Hi, I have existing application which uses Sql server 2005 as a backend. It contains huge records, I need to join tables which contain 50K-70K. Client m/c is lower hardware. So, can I improve its performance by using MS Access as a backend? I also need to search operation on access file. So, which one is better for performance. Queryin...

Values changing when importing from Excel with C#/OLEDB

Hey all, I'm trying to import some data from an Excel spreadsheet into my C# application using OleDB. I use the standard connection string with the IMEX=1,HDR=YES options Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties="Excel 12.0;HDR=YES;IMEX=1" I have a column where the values are mostly the text: TRUE or FALS...

OleDbConnection s FillSchema doesn't change after alter table (Oracle)

Hi, I got a problem when using OleDbConnection in combination with an oracle Database. When i request the schema of an existing Table using the OleDbConnection's FillSchema Method the result seems to get cached somehow. To reproduce the Problem you need to do the followin steps: create a table named cachetest with one column Request ...