Problem - how to avoid adding records to a DBGrid?

delphi

    Sponsored Links

    Next

  • 1. Missing Ibx.hlp file
    The help file is in your Delphi7\Help directory but it is named d7ibx.hlp. IIRC, to fix this problem just make a copy of the help file named ibx.hlp. -- Bill (TeamB) TeamB cannot answer questions received via email Giggler wrote: > I am running delphi 7 with IBX installed. tryed to lookup the > methods for TIBDatabase in the help but get ibx.hlp file missing > error when I selct the methods hotlink. > > Any advise where to find that file would be appreciated.
  • 2. Parameter in IBX
    Dear All, If I make a Master Detail relationship with IBX component, I'm usually use IBDataset both for the Master and the Detail Dataset. But there's seem to be one problem. If I insert a new record in the master dataset then I must post and commit retaining it before I insert a new record in the detail dataset. Otherwise it will complain that it can find the Master field. Although I have set the master field in the detail select query like this : SELECT * FROM dana_ti WHERE id_ti = :id_ti ORDER BY id_dana_ti when I insert a new record in the detail dataset it will complain it can find the id_ti fields except if I state in the Detail dataset before post event like this : Dataset.Fields[2].AsString := idsMaster.Fields[1].AsString; is this normal or did I missed something ? Thanks In Advance Ari
  • 3. Connecting DB within different location
    I want to create an application that could connect to the same application which has been installed in different location via a dial up connection. for instance, application A installed in NY and application B installed in LA they are the same application. Sometimes app A need to check to app B database and change some value there and vice versa, but I still want to use Interbase database and IBX component. What's the proper way to do this ? Any suggestion is greatly appreciated. Thanks in Advance, Ari
  • 4. IBSQLMonitor
    Good Morning I am using the ISQMonitor, but when the SQL (EventText : String) is greater that 255 bytes, sql is truncated. How I obtain the full SQL? Muito Obrigado rodrigo-Rodrigo B Marcondes
  • 5. Query field not found
    Using D7 Architect (Build 8.1). Using a TIBQuery component with a TDataSetProvider and TClientDataSet, I'm having an issue with a "Field not found" error. The SQL statement includes a join to pull in a field called FAMILY from another table, SQL code I just added. After I added the extra SQL, I opened the fields editor of the TIBQuery component and the field added via the join was available, so I added it to the query components fields. I then opened up the associated clientdataset and added the new field, FAMILY, to the CDS fields. No problem there at all. When I run the app and open the offending query (qryProxX), the error "qryProxX: field "FAMILY" not found." I can't for the life of me figure out why this is. I have an exactly parallel setup of query/provider/CDS using an almost idential SQL statement on the same table and it works fine. Any ideas what might cause this or where I might look? Thanks, Chris

Problem - how to avoid adding records to a DBGrid?

Postby Paul Linehan » Mon, 07 Jul 2003 02:36:12 GMT


Hi all,


Small problemo... 

I have a DBGrid -> DataSource - IBQuery/IBUpdateSQL and I want users to 
be able to *_change_* a certain number of configuration parameters 
stored in a database.


This is fine and works a treat - *_BUT_* what I don't want them to be 
able to do is add new records to the DBGrid, but when I do DownArrow at 
the bottom, it gives an error message "Cannot insert into database (No 
Insert Query)" - and this is because I deleted the insert SQL generated 
by the IBUpdateSQL because I didn't want any inserts.

Also, when I do Cntrl-Del, it asks me if I want to cancel - I just want 
the app to do nothing if I try and delete also.


How do I allow people to edit the values already in the DBGrid but not 
let them add (or delete) any records.


TIA.

Paul...


-- 

plinehan__AT__yahoo__DOT__com

C++ Builder 5 SP1, Interbase 6.0.1.6 IBX 5.04

Re: Problem - how to avoid adding records to a DBGrid?

Postby Paul Linehan » Mon, 07 Jul 2003 04:43:39 GMT


 XXXX@XXXXX.COM  says...

 


Thanks Bill.


Paul...


-- 

plinehan__AT__yahoo__DOT__com

C++ Builder 5 SP1, Interbase 6.0.1.6 IBX 5.04

Re: Problem - how to avoid adding records to a DBGrid?

Postby Paul Linehan » Wed, 09 Jul 2003 21:19:16 GMT

 XXXX@XXXXX.COM  says...




Sorry - forgot to mention - using C++ 5 aser sig.

What is eqivalent command in C++?


Paul...



-- 

plinehan__AT__yahoo__DOT__com

C++ Builder 5 SP1, Interbase 6.0.1.6 IBX 5.04

Re: Problem - how to avoid adding records to a DBGrid?

Postby Paul Linehan » Thu, 10 Jul 2003 02:43:12 GMT

 XXXX@XXXXX.COM  says...




I did actually look up the help before posting and couldn't c SysUtils - 
what do I need to include in the header?

I tried a basic app - 1 form, 1 button

void __fastcall TForm1::Button1Click(TObject *Sender)
{

  SysUtils::Abort();

}

get compiler message 

[C++ Error] Unit1.cpp(21): E2090 Qualifier 'SysUtils' is not a class or 
namespace name
[C++ Error] Unit1.cpp(21): E2379 Statement missing ;


tried saving and building app - same ting,


Paul...
 

-- 

plinehan__AT__yahoo__DOT__com

C++ Builder 5 SP1, Interbase 6.0.1.6 IBX 5.04

p.s. just lacerated a tendon in left hand, so pls 
excuse typos and tricky abbrevs - TIA.

Similar Threads:

1.How to display a dbgrid only for adding new records

I'm using firebird and interbase express and bcb6
I want to use a dbgrid only for adding new records
I don't want to display old ones when the form is displayed.
Any ideas;;


2.Unwanted Sorting in DbGrid - after record add

I am new here so pardon me if this issue arised before. 
Scenario: using dbgrid to amend the table content. over multi-tier environment. using clientdataset.

Problem: after adding a record in the dbGrid, data is automatically sorted (believe on sorted by the first field in the grid). 

Question: how do I stop the sorting and wish to control myself on the display after record add. 

Appreciate any input. Cheers


3.Record ordering [Was: Problems wilth filtering records and/or GotoNearest]

Using Delphi 2006, MySQL 5 and Corelab DBExpress drivers.

I have been experimenting with my sorting order problem this weekend. The
only way I can get a correct order is to use TSQLQuery together with a
TDataSetProvider, with option RetainServerOrder, and a ClientDataSet.

But as soon as Delphi tries to interfere with the data (one way or the
other), things get messed up.

For example: I need to use GotoNearest. This means I need to set an index on
my ClientDataSet.

As soon as I add an index, as a result Delphi orders on the clientside (is
this assumption correct ?) and this ordering messes up the sortorder.

Right sort order:

B-9999
B-99999
B89999
B99999

Sort order when specifying index:

B89999
B-9999
B99999
B-99999

It looks like the "-" is being ignored. Because that would lead to:

B89999
B9999
B99999
B99999

And that is once again correct.

So what could cause Delphi to ignore (?) the "-" sign ?


4.Problem: master records + repeating detail records using Rave?

I have a tricky problem, but perhaps somebody can point me to a simple
solution.

I have two tables. The first contains a variable number of records,
and the other contains just three. All are created at runtime.

I need to print the first record held in Table A, followed by the 3
records from Table B, then the second record from Table A, and again
the 3 records from Table B, then the third record in Table A, and
again the 3 records in Table B -- until all Table A records have been,
as below:

------------------------------------------
J Brown, Dingle & Partners  20500.00 28 30
------------------------------------------
C Dellow, Frenchay & Sons   21200.50 29 32
A Brown, Allman Brothers    23030.29 41 18
G Arthurs, Powell Company   48010.00 22 13

------------------------------------------
R Bull, Sanglier et fils    21500.20 26 10
------------------------------------------
C Dellow, Frenchay & Sons   21200.50 29 32
A Brown, Allman Brothers    23030.29 41 18
G Arthurs, Powell Company   48010.00 22 13

------------------------------------------
T Woods, Research Group     19250.90 02 09
------------------------------------------
C Dellow, Frenchay & Sons   21200.50 29 32
A Brown, Allman Brothers    23030.29 41 18
G Arthurs, Powell Company   48010.00 22 13

etc.

The above is a trivial programming problem. What makes it tricky is to
accomplish it using Rave Reports. This is part of a larger project for
users who are familiar with the Rave interface.

Thanks in advance.

Bob Yorke

5.dbGrid, with multi-record drag and drop

I am looking for a dbGrid which supports multiple row selection, and
then the ability to drag and drop all selected rows. 

6. Open second form to edit DBGrid record

7. Delphi 2: DBGrid showing records limited to its size

8. display the record number on dbgrid



Return to delphi

 

Who is online

Users browsing this forum: No registered users and 29 guest