Subject AW: AW: AW: [IBO] Updating data ?
Author Queck Rainer
Hello Helen,

first :sorry for the double-L, it seems that my finger speeded up on the Hello and couldn't stop in time on your name :-)
secound : Thanks a lot for takeing the time to analyse my demo.dpr!

In the meanwhile I followed Set's advise...
>
StartTransaction (which overrides AutoCommit since it is equivalent to
saying that you want to handle the transaction yourself)
<
and now my app is running :-))

Wouldn't the demo app run on your machine only with this line commented?

Regards
Rainer




-----Ursprüngliche Nachricht-----
Von: Helen Borrie [mailto:helebor@...]
Gesendet: Freitag, 11. April 2003 10:58
An: IBObjects@yahoogroups.com
Betreff: Re: AW: AW: [IBO] Updating data ?


At 09:22 AM 11/04/2003 +0200, you wrote:
>Hello Hellen,

I'm the One-L Helen... :-)

>
>Maybe it is easier to help me if there is a little demo.dpr showing what I
>am doing (wrong).
>I placed it for download at : www.qutronic.de/download/IboProblem.zip
>
>It has the backuped (test-) database in it.

Yep, got it, and found several problems. It will help to look at the .dfm
for the datamodule:

object DataModule1: TDataModule1
OldCreateOrder = False
OnCreate = DataModuleCreate
Left = 2
Top = 162
Height = 480
Width = 696
object IB_Connection1: TIB_Connection
PasswordStorage = psNotSecure
SQLDialect = 3
Params.Strings = (
'PATH=C:\TEMP\TEST.GDB'
'CHARACTER SET=ISO8859_1'
'USER NAME=SYSDBA'
'SQL DIALECT=3'
'PROTOCOL=TCP/IP')
Left = 56
Top = 32
SavedPassword = '.JuMbLe.01.432B0639073E0E4B49'
end
object IB_Transaction1: TIB_Transaction
IB_Connection = IB_Connection1
AutoCommit = True
Isolation = tiCommitted
Left = 152
Top = 32
end
object IB_DataSource1: TIB_DataSource
Dataset = IB_Query1
Left = 64
Top = 128
end

object IB_Query1: TIB_Query
DatabaseName = ':C:\TEMP\TEST.GDB' // SEE THE EXTRA ':' AT THE START?
IB_Connection = IB_Connection1
IB_Transaction = IB_Transaction1
SQL.Strings = (
'SELECT *'
'FROM PROGRAMSTOMONITOR')
ColorScheme = False
MasterSearchFlags = [msfOpenMasterOnOpen, msfSearchAppliesToMasterOnly]
RequestLive = True
BufferSynchroFlags = []
FetchWholeRows = True
Left = 152
Top = 128
end
end

First thing, you have your datamodule and your form in the wrong creation
order. In the DPR file, move this line up so it is ahead of the line
that creates the form:

Application.CreateForm(TDataModule1, DataModule1);

Also, notice, you have no KeyLinks defined - need to define PROGRAMNO.

Now you need to define GeneratorLinks for ProgramNo.

In GeneratorLinks:

PROGRAMNO=PROGRAMSTOMONITORGEN

Next, you need to go to the ColumnAttributes for the query and set the
REQUIRED attribute of PROGRAMNO to false.

I also commented out this line, as this project has the transaction set to
Autocommit and it's all you need for now.

The other thing is to go to the ib_connection and select your transaction
component for DefaultTransaction.

Now it works. :-)

Helen





Yahoo! Groups Sponsor
<http://us.ard.yahoo.com/M=249982.3083889.4452939.1728375/D=egroupweb/S=1705007183:HM/A=1524963/R=0/*http://hits.411web.com/cgi-bin/autoredir?camp=556&lineid=3083889&prop=egroupweb&pos=HM>
<http://us.adserver.yahoo.com/l?M=249982.3083889.4452939.1728375/D=egroupmail/S=:HM/A=1524963/rand=608920411>

___________________________________________________________________________
IB Objects - direct, complete, custom connectivity to Firebird or InterBase
without the need for BDE, ODBC or any other layer.
___________________________________________________________________________
http://www.ibobjects.com - your IBO community resource for Tech Info papers,
keyword-searchable FAQ, community code contributions and more !

Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service <http://docs.yahoo.com/info/terms/> .




[Non-text portions of this message have been removed]