Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
|
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 6th, 2005, 07:08 AM
Friend of Wrox
 
Join Date: Sep 2004
Posts: 140
Thanks: 0
Thanked 0 Times in 0 Posts
Default Err with OLE Db Connection

I have a code provided below it runs on some machine and dosen't on some ..Means some time it dose not open connection and some time gives error on GetOleDbSchemaTable ..

Can any one help..



String sConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=F:\Data.xls;Extended Properties=""Excel 8.0;HDR=Yes""";
OleDbConnection objConn = new OleDbConnection(sConnectionString);
objConn.Open();
// Get the data table containing the schema
DataTable dt = objConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables , null);

 
Old June 9th, 2005, 09:20 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Try checking the MDAC versions installed on the two machines. This sounds like a discrepancy between database engines.

-Peter
 
Old June 9th, 2005, 11:21 PM
Friend of Wrox
 
Join Date: Sep 2004
Posts: 140
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks Planoie
I have worked it out what I did
<identity impersonate="true" userName="domain\user" password="pwd" />
and in your C:\Documents and Settings\Default User\Local Settings\temp
agve permission to the user it worked






Similar Threads
Thread Thread Starter Forum Replies Last Post
Mysql OLE DB Connection String oranginalab Classic ASP Databases 9 September 4th, 2016 08:40 AM
connection string to Oracle, Invalid Argument,err sparsh2010 Access VBA 1 February 14th, 2008 08:31 AM
OLE-DB grstad Classic ASP Basics 7 January 28th, 2007 09:25 AM
If any one knows How to develop ole db anjicafe Visual C++ 0 June 15th, 2005 09:01 PM
Trouble makink Connection - err(80004005) chmosiii Classic ASP Databases 3 August 6th, 2004 03:49 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.