ADO Connection to Excel; Connection String Changes After Disconnect?

I'm working on this new project in XE8 and trying to read data from an Excel xls spreadsheet (not an xlsx sheet).

I'm still working on it in the IDE and I've noticed that when I get the connection string all setup (in the TADOConnection component), including the "Extended Properties=Excel 8.0" (that's required to connect) and I make Connected true and then make Connected false the connection string loses the extended properties that I manually entered. So if I try and connect again I get an error message "Unrecognized Database Format".

I'm sure that I can overcome this by adding a BeforeConnect event to the ADOAconnection and just assign the correct connection string before but should this be happening? Is it normal behavior for the connection string to change or revert to some default when the component disconnects? If there a way to prevent this behavior?

- Chris
0
Chris
5/27/2015 12:16:10 AM
embarcadero.delphi.ado 597 articles. 1 followers. Follow

0 Replies
1055 Views

Similar Articles

[PageSpeed] 47

Reply:

Similar Artilces:

Connection String for ADO Database in delphi prism
Hi, I want to connect to a database with ADO and aspx. from VB code what is the equivalent in delphi prism ? .... Dim MyReader as sqldatareader Dim MyConnection as sqlconnection = new sqlconnection() myConnection.connectionstring = configurationmanager.connectionstrings("DSN_MYDB").connectionstring Dim mycommand as sqlcommand = new sqlcommand() mycommand.commandtext="select * from mytable" mycommand.commandtype = commandtype.text mycommand.connection = myconnection mycommand.connection.open() Myreader=mycommand.executereader(commandbehavior.closeconnec...

Can I change my connection string without much ado?
I have a working gridview and I want to change its connection string to another file of exact same structure on another server. It blew up on me saying "error rendering control: Databinding:system.data.datarowview does not contain a property with the name Job-order_number"PS. It's OLE DB for Foxpro may be you are missing job-order_number column in your new structure, which is there in previous one.My Blog"Don't be afraid to be wrong; otherwise you'll never be right." Hi,Fonzie :Would you plz post some relative code here?Best Regards,_____________...

ADO Connection string
Does anyone know where there are any examples of connecting to an ASA db using an ADO _Connection object in C++? Thanks, -TC A quick search through this newsgroup would have resulted in the following find : cnADODB.ConnectionString = "Provider=ASAProv;LINKS=TCPIP();ENG=myDBEngine;DBN=myDBName;uid=DBA;pwd=SQL" -- Reg Domaratzki, Sybase iAnywhere Solutions Certified SQL Anywhere Associate Please reply only to the newsgroup ASA Patches and EBFs : http://downloads.sybase.com/swx/sdmain.stm -> Choose SQL Anywhere Studio -> Set "Platform ...

Recycling connections in a ADO.Net connection pool
I have a requirement where I will need to get a handle on the existing connections in a particular ADO.Net connection pool (identified by the unique connection string) and close and open them one by one. This is because whenever we compile a package or stored procedure, ADO.Net does not realise this and keeps giving "Package is invalid" error. I am using ODP.Net Client 9.2.0.4. The current solution is to restart the application pool to flush the connection pool. Does anyone know how to get a list of all connection objects in the ADO.Net connection pool given a connection stri...

ADO Connection string security
I would like to have an ADO database using ADO Connection string. Should I use the least rights user ID and password to connect database? If yes, do I need to build ADO Connection string for every user log in that database can handle all security and user rights? If this is the case, any example to build ADO Conneciton string at run time and connect to the users. Your help and information is great appreciated, Regards, Inung > {quote:title=Inung Huang wrote:}{quote} > I would like to have an ADO database using ADO Connection string. > Should I use the least rights user I...

ADO.NET Connection String
Can anyone provide the ADO.NET connection string for ASE 12.5? I am using VB.NET and would like to connect to Sybase's ASE 12.5 server on the Windows 2K platform. The ADO connection string for VB 6.0 did not work. Thanks Tom ...

ADO Connection String question
I am trying to setup a database connection using ADOConnection where information is stored in an INI file. In the form OnCreate event, the INI file is read into global string fields MyCatalog, MyDbase, MyPassword, MyUserID. Then I try at FormShow: procedure TForm1.FormShow(Sender: TObject); begin MyConnectString := 'Provider=SQLOLEDB.1;Persist Security Info=True;Initial Catalog='+ MyCatalog + ';Data Source=' + MyDbase + ';Password=' + MyPassowrd + ';User ID=' + MyUserID; ...

Can change of connection string reset the connection pool?
Hi, In fact, I already asked a similar question about closing/reset all connections in connection pool. But I want to know clearly about how to do this. I have the following questions for this issue: 1. Suppose some connections are created a connection string (with connection pool settings), if I update the connection string with new password, will ASEConnection know to create a new connections with new connection pool via Open() method? In my case, it will not. But I want to know if someone encounter difficult results? 2. If the above step 1 not work, then sho...

ADO Connection Does Not Work W/ Same Parameters As DSN Connection
Folks, Could you please help me with the following code? When the program gets to the line that says: .Open userid:="myID", Password:="myPassword" I get an error message saying "[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified". What I can't figure out is I'm not using a data source name and what do I need a default driver for? I've already specified the driver and it's right where I said it was. I'm running on an NT 4.0 (SP4) platform using VB6 (SP5). My references are * Micro...

datetime trouble in ADO Microsoft ADO .NET Connection
Hi, All! MS SQL 200 PB 10.2.1 build 9557 In PB DB Painter: select dateevent from AuditInternal where id_event = 201865; Result: ADO Microsoft ADO .NET Connection: 214:35:45:633 OLE Microsoft OLE DB Connection: 01.03.2006 12:35:45:633 It has begun in 9537 In 9557 same. In 9004 all this it was good thanks, Alexey ...

ADO Connection Does Not Work W/ Same Parameters As DSN Connection
Folks, Could you please help me with the following code? When the program gets to the line that says: .Open userid:="myID", Password:="myPassword" I get an error message saying "[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified". What I can't figure out is I'm not using a data source name and what do I need a default driver for? I've already specified the driver and it's right where I said it was -- i.e., c:\dbodbc8.dll. I'm running on an NT 4.0 (SP4) platform using VB6 (SP5). My...

ADO Connection
When I try to connect to my database with ASA Provider I get an invalid Enum value error. But if I connect to it using the OLE ODBC it connects fine. Can you provide a code snippet of what you are doing and a description of the language/environment you are using? Steve Radman, iAnywhere Solutions Sybase, Inc. "Ryan Wade" <rwade@smscorp.com> wrote in message news:395218D0.75EDF354@smscorp.com... When I try to connect to my database with ASA Provider I get an invalid Enum value error. But if I connect to it using the OLE ODBC it connects fine. Hi! &...

ADO connectivity
Is there some kind of Sybase ADO DB Provider available? I need to switch from the ADO ODBC driver, as it does not support transactions. Any help would be VERY much appreciated. I can be reached via e-mail as stew_thomson*NOSPAM*@hotmail.com Just remove the *NOSPAM* from the e-mail addy. ASA 7.0 has an OLEDB provider which you can use with ADO. However, I thought the MSDASQL OLEDB provider also supported transactions. What makes you think it doesn't? Jason Hinsperger International and Sustaining Engineering Adaptive Server Anywhere stew_thomson*NOSPAM*@hotmail.co...

Help with ADO connectivity in Delphi XE
The company I work for has finally started migrating applications from Delphi 5 and 7 to Delphi XE and XE2. But, I am having a problem with a TADOConnection. A simple application built in D5 to connect to a MS SQL database works. But the same code compiled in Delphi XE will not connect. When the user's role changes from User to Power User, they can connect to the database in the app compiled in XE. The workstation that the user is running from is Windows XP. The SQL Server version is 2005. MDAC version 2.8 Unfortunately, we have been unable to simulate their environment, an...

Web resources about - ADO Connection to Excel; Connection String Changes After Disconnect? - embarcadero.delphi.ado

Disconnect (2012 film) - Wikipedia, the free encyclopedia
The film explores how people experience the negative sides of modern communication technology by following three stories. Up-and-coming reporter ...

Did Mark Zuckerberg Disconnect Facebook Phone Rumors Once And For All?
Facebook Co-Founder and CEO Mark Zuckerberg has attempted over and over to squash speculation about a Facebook phone, and he offered his strongest ...

Huff/Post50 - A question: When you disconnect from someone... - Facebook
A question: When you disconnect from someone on Facebook, are you unfriending them or defriending them? And does it matter? Well, why you DID ...

Disconnect - tracking and malvertising protection on the App Store
Read reviews, compare customer ratings, see screenshots, and learn more about Disconnect - tracking and malvertising protection. Download Disconnect ...

disconnect
if you can't unplug, just cut the cord

Disconnect - YouTube
Disconnect lets you visualize and block 2,000+ third-party tracking sites to make the web faster, more private, and more secure. As a Certified ...

‘Big Disconnect’ Offers Guidance for Parents in a Tech-Crazed World
Did you hear the one about the 7-year-old boy who opened a Wii on Christmas morning and when his parents finally checked on him, he’d played ...

Cruising Fiji: The ultimate disconnect
It took three years of negotiations over much kava before a cruise line could set sail for Fiji's remote Lau islands, writes Katrina Lobley. ...

Correcting an NBN Co disconnect
Behind the expected red numbers NBN Co revealed some encouraging trends, albeit off a low base. And Bill Morrow is moving decisively to clear ...

'Some disconnect': inquiry wants Premier Mike Baird's $300 billion power claim tested by experts
... NSW would be $300 billion better off if the state's electricity assets are privatised should be independently tested, amid &quot;some disconnect&quot; ...

Resources last updated: 12/16/2015 11:26:12 PM