473,796 Members | 2,680 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

OleDbConnection extended properties

I've set up some visual basic .net code to read a spreadsheet. It
works, but not all the time. Sometimes I get an error where the
Microsoft Jet Engine could not access the spreadhsheet tab name, which
has been entered in the application and I know to be correct.

Here's the code:

MyConnection = New System.Data.Ole Db.OleDbConnect ion( _
"provider=Micro soft.Jet.OLEDB. 4.0; " & _
"data source=" & strFilename & "; " & _
"Extended Properties=Exce l 8.0;")

Is there something about the Extended Properties parameter that I can
tweak or make more robust? I've searched this forum but always see
basically this same setup to read Excel.

Thanks.

Mar 17 '06 #1
0 1719

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
7242
by: Lilly | last post by:
Hi all. I'm really sorry for this post, I'm sure most of you will think it's a silly question, but the following doesn't work and I'm really new to ASP.NET: <%@ Page Language="C#" %> <%@ import Namespace="System.Data" %> <%@ import Namespace="System.Data.OleDb" %> <script runat="server">
0
1939
by: Seth | last post by:
First off, my apologies if this is in the wrong newsgroup, but I hope I'm close enough. I'm trying to do some parsing of a CSV file using OleDbConnection, but for some reason, when I populate my DataSet, it is trimming the trailing spaces. Anybody know why? Here is my code: System.Data.OleDb.OleDbConnection connection = null;
2
1633
by: Gene Hubert | last post by:
I'm using an OleDbConnection object to read a text file. It works fine but what I really want to do is read a small sample from a very large file. I'm looking for a way to limit the number of lines read from the file. I thought there might be something in the Extended Properties of the connection string but can't find anything. I searched the online help for "Extended Properties" and couldn't find a blasted thing. Any help would be...
6
3529
by: Bob Achgill | last post by:
I would like to set the DataSource path on my Oledbconnection so that the Windows application will always look in the place where the binary is stored when it looks for the Access database file. How can this be done? I tried sticking the function CurDir() into the property string but I don't seem to be getting the syntax right. Here is the connection string that I am trying to modify.
0
1665
by: Ray | last post by:
Hi All I've tried to read a .csv file and bind the data to a datagrid. I am doing sth like this: conn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;"+ "Data Source=" + csvPath + ";" + "Extended Properties=\"text;HDR=YES;FMT=Delimited\""); conn.Open(); //Read all data into a data table
0
942
by: CyberLotus | last post by:
Hi, I've created a web application and through this I want to import Excel data to database. Following is the code that I've written, ******************************************************************* string fileLocation = txtboxFileName.Text.ToString(); string sheetName = "Import"; string connectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data
0
1556
by: archana | last post by:
Hi all, I wrote one application to read excel files data into datatable. To get data of excel file into datatable i used oledbconnection. In connectonstring i set extended properties as excel 8.0. My question is for excel, will extended properties be always 8.0. Or it may varies depending on excel version installed on client PC.
2
5902
by: dmateer | last post by:
I have the following code in an asp.net page: System.Data.OleDb.OleDbConnection cn = new System.Data.OleDb.OleDbConnection(); cn.ConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\myservername\ExcelTemp\Temp.xls;Extended Properties=Excel 8.0"; cn.Open(); cn.Close();
0
1508
by: MightyFeldar | last post by:
I've looked just about everywhere and pieced together as best as I can the code to update the tracking number in a CSV file for an order that has shipped out from our company so we can upload the file to our online shopping cart. I have 1 file with 3 columns that is an export from our shipping program, and the file that needs to be updated that we download from the shopping cart, insert the tracking numbers and re-upload. File 1:...
0
9535
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
10242
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...
1
10200
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9061
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
7558
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
5453
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
5582
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4127
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2931
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.