Solved

Link a field in excel worksheet to a textbox on a delphi form via ADO

Posted on 2003-10-28
1
785 Views
Last Modified: 2010-04-16
Hi all,
I have managed to create connection to the excel  worksheet and i can show it in datagrid. Now I have 2 problems:

1) how to link a particular field (name) in excel worksheet to a textbox on the delphi form.

2) any link that can show me how to add and update records in excel worksheet via ADO Connection?

Thax.
Rice Cake
0
Comment
Question by:antioch_75
1 Comment
 
LVL 1

Accepted Solution

by:
JackNaif earned 250 total points
ID: 9637774
1) Instead of a normal edit box try using a dbedit. (I assume that when you say a datagrid you mean a dbgrid. dbedit is similar, but it's got one mor DB related property to choose the field it's going to contain.

2) At http://www.phidels.com/php/zip/oleexcel.zip you have a wonderfull example of how to interact with Excel but a) it's in French b) it uses Ole rather than Ado.

Anyway, if you already know how to use a normal Dataset to update and add records, and you've managed to open the excel via ADO, then updating and adding records through ADO should be a piece of cake because the TADODataSet has all the same methods and properties and events than the TDataSet. You shouldn't need too much of an example to do it.

Hope it helps:

Jack
0

Featured Post

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question