473,614 Members | 2,352 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

C# Microsoft Jet database engine could not find the object ''

7 New Member
HI all..i have this excel file created during export data from sql server. When i try to import this error occured "external data is not in the correct format' something like that. After i did some research the extended properties need to be change to HTML Import from Excel 8.0. Then the connection is ok. I want to try to import the data from 'Sheet_1' to table in server but another error come up. The Microsoft Jet database engine could not find the object 'Sheet_1$'. Make sure the object exists and that you spell its name and the path name correctly. In my excel there is a sheet named Sheet_1.

Expand|Select|Wrap|Line Numbers
  1. OleDbConnection connection = new OleDbConnection(excelConnectionString);
  2. connection.Open();
  3.  
  4. OleDbCommand command = new OleDbCommand("SELECT * FROM [Sheet_1$]", connection);
  5.  
  6. OleDbDataReader dr = command.ExecuteReader(); <--error here
How to solve this problem? Thanks in advance :)
Aug 18 '08 #1
2 3709
Curtis Rutland
3,256 Recognized Expert Specialist
That error seems to say that Sheet_1 doesn't exist. Perhaps the name of that sheet is different.

Show your connection string (you can edit out sensitive data).
Aug 18 '08 #2
DeelynBaNi
7 New Member
That error seems to say that Sheet_1 doesn't exist. Perhaps the name of that sheet is different.

Show your connection string (you can edit out sensitive data).
My connection string:

string excelConnection String = "Provider=Micro soft.Jet.OLEDB. 4.0;Data Source=" + source.Text + ";Extended Properties=\"HT ML Import;HDR=Yes; IMEX=1;\"";

I've check many times and Sheet_1 exist and contain data to be import.
Aug 19 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
4414
by: Dejan M. | last post by:
Please can you help me with this problem: In the next form, when I Add new person who is not registered in the base I had the massage: The Microsoft Jet database engine cannot find a record in the table 'CLAN' with key matching field(s) JMBG. The question is: How to add data for the unregistered visitors in the next fields: JMBG (unique person number);(translation) STATUS;
3
2638
by: PeterH | last post by:
I have an application written in VB.Net that opens an Access database (ie a Microsoft Jet 4 database mdb file). It does not use Access forms or reports, so there is no need for users to have Access itself. I have two questions. 1) Must my users must have the Jet 4 database engine? Or is its functionality contained in the .Net Framework? 2) Jet 4 was distributed with Access 2000 and subsequent versions. Was it distributed with...
17
14532
by: MLH | last post by:
The Microsoft Jt database engine can not find tblJobSites, error #3078. That's what I get when executing this code... Private Sub Command1_Click() Dim MyWorkspace As Workspace Set MyWorkspace = DBEngine.Workspaces(0) Dim MyDB As Database Dim MyQueryDef As QueryDef, MyRecSet As Recordset Dim MyPeriod As String, MyRand As Double
8
6982
by: chippy | last post by:
Hi, I've a VB script that creates a Access object in a word doc. Here is the full script. It works for all but the Export. Which always fails with a 3011 error. If I do the same in Access as a straight Macro or script it works. Add it as an object and it won't work. HELP.
2
2078
by: Abubakar | last post by:
Hello , I just finished developing a program using Microsoft Desktop Engine with C# as the front end. Everything is okay on my system. But, on trying to deploy it on a different system it gives an error message that it can open the database This is my first time in using the Microsoft Desktop engine. All this while I have been using Access as my database engine and normally what I do after developing a program is to transfer the Database file...
1
2027
by: Jean-Marc Blaise | last post by:
Hi, I find much regrettable that Database Engine Tuning Advisor be not part of MS-Express Edition ... A server without such help is not a server. Besides, you've got the tutorials, but not the tool to play with :-((( Regards, JM Blaise
0
1583
by: Orgil | last post by:
Hi all, I have just writing a program named "DayBook". I am using MS Access 2003 database and Microsoft .NET C# 2005 (with framework 2.0). MS Access 2003, MS .NET C# 2005 and dotNetFramework2.0 are installed on my computer on which I have made my program. My program uses many queries. But the first query string, executed when program begins, is : "SELECT , , FROM ".
1
8323
by: babyjek | last post by:
SELECT ProjectID, ProjectName, ProjectDescription, SequenceNumber, LastUpdateDate FROM Project WHERE ProjectID = @ProjectID; (The Microsoft Jet database engine cannot find the input table or query 'Project'. Make sure it exists and that its name is spelled correctly.)
2
15196
by: phuc2583 | last post by:
I have a problem with an application I developed with code charge. Whenever I try to access a table in a database I get the following error: Microsoft JET Database Engine error '80040e09' Cannot update. Database or object is read-only. Secondly, I find it difficult to use code charge to append/add records from one table(in a grid form) to another(within the same database) Please, If you've come across this problem & have been able...
0
8142
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8642
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8591
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7115
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6093
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4058
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4138
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1758
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1438
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.