Solved

how use a tdblookupcombobox editable

Posted on 2006-06-19
6
402 Views
Last Modified: 2010-04-04
in microsoft acces the combobox list column of table and insert the value in the same table, but i can type a new value,  in delphi  if use a query of table in list source an table in datasource, function but i cant type a value if not exist in query

this use in my aplication where edit a column can use value in the column of the same table o insert a new value
0
Comment
Question by:JesusOmarSanchez
  • 2
6 Comments
 
LVL 7

Accepted Solution

by:
kfoster11 earned 63 total points
ID: 16939402
TQuery's result set is by definition read only.  But...

this is an excerpt from the help file.  Go to Delphi | Help | Index | TQuery and select Using TQuery
then select "Obtaining an editable result set "

here is the page.

To request a result set that users can edit in data-aware controls, set a query component's RequestLive  property to True. Setting RequestLive to True does not guarantee a live result set, but the BDE attempts to honor the request whenever possible. There are some restrictions on live result set requests, depending on whether the query uses the local SQL parser or a server's SQL parser.

Queries where table names are preceded by a BDE database alias (as in heterogeneous queries) and queries executed against Paradox or dBASE are parsed by the BDE using Local SQL. When queries use the local SQL parser, the BDE offers expanded support for updatable, live result sets in both single table and multi-table queries. When using Local SQL, a live result set for a query against a single table or view is returned if the query does not contain any of the following:

DISTINCT in the SELECT clause
      Joins (inner, outer, or UNION)
      Aggregate functions with or without GROUP BY or HAVING clauses
      Base tables or views that are not updatable
      Subqueries
      ORDER BY clauses not based on an index
      Queries against a remote database server are parsed by the server. If the RequestLive property is set to True, the SQL statement must abide by Local SQL standards in addition to any server-imposed restrictions because the BDE needs to use it for conveying data changes to the table. A live result set for a query against a single table or view is returned if the query does not contain any of the following:

A DISTINCT clause in the SELECT statement
      Aggregate functions, with or without GROUP BY or HAVING clauses
      References to more than one base table or updatable views (joins)
      Subqueries that reference the table in the FROM clause or other tables

If an application requests and receives a live result set, the CanModify property of the query component is set to True. Even if the query returns a live result set, you may not be able to update the result set directly if it contains linked fields or you switch indexes before attempting an update. If these conditions exist, you should treat the result set as a read-only result set, and update it accordingly .

If an application requests a live result set, but the SELECT statement syntax does not allow it, the BDE returns either

A read-only result set for queries made against Paradox or dBASE.
      An error code for SQL queries made against a remote server.
      
0
 
LVL 7

Expert Comment

by:kfoster11
ID: 16939404
Otherwise, use the TTable Component, but keep in mind this is much slower.
0
 
LVL 27

Assisted Solution

by:kretzschmar
kretzschmar earned 62 total points
ID: 16939682
usual a tdblookupcombo is used for
- a readable content
- a selection tool for valid entires
- avoid of unknown, invalid entries

so it is normal that you can't edit there entries,
you can only select known entries

additional (not checked) it could be
that the access combobox you have is not linked
to a lookup table (it may be just a list of predefined static entries,
because i don't think that access may able to insert into a lookup table,
by only editinig a (one, of maybe many fields in this table) lookup-field)

meikl :-)
0
 

Expert Comment

by:fvazquez
ID: 17251393
I've had the same problem, but instead of using a Tdblookupcombobox, I use a simple TEdit, then OnExit I tell the content to write in the table, and I populate a ComboBox in a way that every time I insert a new Item this is searched through the table, if it's  found then I'm able to edit it, if it's not found then it's inserted in the table. I hope this is of any help to you.
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

743 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now