Jump to content

Firebird and Unigui


Guest

Recommended Posts

Message from: "Luis Diaz"

 

El 18/01/2011 18:10, Junior/RO escribió:

> Luis Diaz escreveu:

>

>> What it's a better components to access to Firebird with unigui?

> I am using Zeos, but only the trunk version of development of Zeos works well with Delphi 2010.

I try Interbase components, but I get error when put a

TIbSql+TIBtransaction in a form created in runtime.

I do not understand how I should use the data access compenentes.

My scenario is:

In a MainModule put:

 

Link to comment
Share on other sites

Message from: "Farshad Mohajeri"

 

"Luis Diaz" wrote in message

news:FtSrPS0tLHA.2164@anaxagvs227...

> El 18/01/2011 18:10, Junior/RO escribió:

>> Luis Diaz escreveu:

>>

>>> What it's a better components to access to Firebird with unigui?

>> I am using Zeos, but only the trunk version of development of Zeos works

>> well with Delphi 2010.

> I try Interbase components, but I get error when put a

> TIbSql+TIBtransaction in a form created in runtime.

> I do not understand how I should use the data access compenentes.

> My scenario is:

> In a MainModule put:

> -- One IBDatabase for use for all forms

> -- One IbSql+IbTransaction for validate user and password in login form.

> Login form is a panel in Main Form.

> From Main form call to second form (created at runtime) with one

> IBsql+Ibtransaction for search data form.

> Login form works well, bat in the second form I get error "unprepared

> statament" when execute the query.

> And I can not find a solution to the problem...

 

You scenario looks plausible. Have you tested your project in Desktop mode

first?

 

 

.

 

Link to comment
Share on other sites

Message from: "Farshad Mohajeri"

 

"Luis Diaz" wrote in message

news:FtSrPS0tLHA.2164@anaxagvs227...

> El 18/01/2011 18:10, Junior/RO escribió:

>> Luis Diaz escreveu:

>>

>>> What it's a better components to access to Firebird with unigui?

>> I am using Zeos, but only the trunk version of development of Zeos works

>> well with Delphi 2010.

> I try Interbase components, but I get error when put a

> TIbSql+TIBtransaction in a form created in runtime.

> I do not understand how I should use the data access compenentes.

> My scenario is:

> In a MainModule put:

> -- One IBDatabase for use for all forms

> -- One IbSql+IbTransaction for validate user and password in login form.

> Login form is a panel in Main Form.

> From Main form call to second form (created at runtime) with one

 

How do you create your Form at runtime? Post a code snippet.

 

 

.

 

Link to comment
Share on other sites

Message from: "Luis Diaz"

 

El 18/01/2011 20:37, Farshad Mohajeri escribió:

> "Luis Diaz" wrote in message

> news:FtSrPS0tLHA.2164@anaxagvs227...

>> El 18/01/2011 18:10, Junior/RO escribió:

>>> Luis Diaz escreveu:

>>>

>>>> What it's a better components to access to Firebird with unigui?

>>> I am using Zeos, but only the trunk version of development of Zeos works

>>> well with Delphi 2010.

>> I try Interbase components, but I get error when put a

>> TIbSql+TIBtransaction in a form created in runtime.

>> I do not understand how I should use the data access compenentes.

>> My scenario is:

>> In a MainModule put:

>> -- One IBDatabase for use for all forms

>> -- One IbSql+IbTransaction for validate user and password in login form.

>> Login form is a panel in Main Form.

>> From Main form call to second form (created at runtime) with one

> You scenario looks plausible. Have you tested your project in Desktop mode

> first

No I defined the project only as Isapi.

> How do you create your Form at runtime? Post a code snippet.

procedure TMainForm.UniButton6Click(Sender: TObject);

var calendario : TExpPerCalendario;

begin

PMenu.Visible:=false;

Calendario := TExpPerCalendario.Create(uniApplication);

Calendario.CodTerceiro :=

MainModule.UniMainModule.QueryUsu.FieldByName('USU_TER').AsString;

Calendario.Show;

end;

.

 

Link to comment
Share on other sites

Message from: "Farshad Mohajeri"

 

"Luis Diaz" wrote in message

news:qcLvse0tLHA.2164@anaxagvs227...

> El 18/01/2011 20:37, Farshad Mohajeri escribió:

>> "Luis Diaz" wrote in message

>> news:FtSrPS0tLHA.2164@anaxagvs227...

>>> El 18/01/2011 18:10, Junior/RO escribió:

>>>> Luis Diaz escreveu:

>>>>

>>>>> What it's a better components to access to Firebird with unigui?

>>>> I am using Zeos, but only the trunk version of development of Zeos

>>>> works

>>>> well with Delphi 2010.

>>> I try Interbase components, but I get error when put a

>>> TIbSql+TIBtransaction in a form created in runtime.

>>> I do not understand how I should use the data access compenentes.

>>> My scenario is:

>>> In a MainModule put:

>>> -- One IBDatabase for use for all forms

>>> -- One IbSql+IbTransaction for validate user and password in login form.

>>> Login form is a panel in Main Form.

>>> From Main form call to second form (created at runtime) with one

>> You scenario looks plausible. Have you tested your project in Desktop

>> mode

>> first

> No I defined the project only as Isapi.

 

OK. Can you recompile it for Desktop mode and see if the problem persists?

This problem looks irrelevant to uniGUI.

 

>> How do you create your Form at runtime? Post a code snippet.

> procedure TMainForm.UniButton6Click(Sender: TObject);

> var calendario : TExpPerCalendario;

> begin

> PMenu.Visible:=false;

> Calendario := TExpPerCalendario.Create(uniApplication);

> Calendario.CodTerceiro :=

> MainModule.UniMainModule.QueryUsu.FieldByName('USU_TER').AsString;

> Calendario.Show;

> end;

 

 

.

 

Link to comment
Share on other sites

Message from: "Luis Diaz"

 

El 18/01/2011 20:44, Farshad Mohajeri escribió:

> "Luis Diaz" wrote in message

> news:qcLvse0tLHA.2164@anaxagvs227...

>> El 18/01/2011 20:37, Farshad Mohajeri escribió:

>>> "Luis Diaz" wrote in message

>>> news:FtSrPS0tLHA.2164@anaxagvs227...

>>>> El 18/01/2011 18:10, Junior/RO escribió:

>>>>> Luis Diaz escreveu:

>>>>>

>>>>>> What it's a better components to access to Firebird with unigui?

>>>>> I am using Zeos, but only the trunk version of development of Zeos

>>>>> works

>>>>> well with Delphi 2010.

>>>> I try Interbase components, but I get error when put a

>>>> TIbSql+TIBtransaction in a form created in runtime.

>>>> I do not understand how I should use the data access compenentes.

>>>> My scenario is:

>>>> In a MainModule put:

>>>> -- One IBDatabase for use for all forms

>>>> -- One IbSql+IbTransaction for validate user and password in login form.

>>>> Login form is a panel in Main Form.

>>>> From Main form call to second form (created at runtime) with one

>>> You scenario looks plausible. Have you tested your project in Desktop

>>> mode

>>> first

>> No I defined the project only as Isapi.

> OK. Can you recompile it for Desktop mode and see if the problem persists?

> This problem looks irrelevant to uniGUI.

>

how I do this?

 

.

 

Link to comment
Share on other sites

Message from: "Farshad Mohajeri"

 

"Luis Diaz" wrote in message

news:sCgR9i0tLHA.2164@anaxagvs227...

> El 18/01/2011 20:44, Farshad Mohajeri escribió:

>> "Luis Diaz" wrote in message

>> news:qcLvse0tLHA.2164@anaxagvs227...

>>> El 18/01/2011 20:37, Farshad Mohajeri escribió:

>>>> "Luis Diaz" wrote in message

>>>> news:FtSrPS0tLHA.2164@anaxagvs227...

>>>>> El 18/01/2011 18:10, Junior/RO escribió:

>>>>>> Luis Diaz escreveu:

>>>>>>

>>>>>>> What it's a better components to access to Firebird with unigui?

>>>>>> I am using Zeos, but only the trunk version of development of Zeos

>>>>>> works

>>>>>> well with Delphi 2010.

>>>>> I try Interbase components, but I get error when put a

>>>>> TIbSql+TIBtransaction in a form created in runtime.

>>>>> I do not understand how I should use the data access compenentes.

>>>>> My scenario is:

>>>>> In a MainModule put:

>>>>> -- One IBDatabase for use for all forms

>>>>> -- One IbSql+IbTransaction for validate user and password in login

>>>>> form.

>>>>> Login form is a panel in Main Form.

>>>>> From Main form call to second form (created at runtime) with one

>>>> You scenario looks plausible. Have you tested your project in Desktop

>>>> mode

>>>> first

>>> No I defined the project only as Isapi.

>> OK. Can you recompile it for Desktop mode and see if the problem

>> persists?

>> This problem looks irrelevant to uniGUI.

>>

> how I do this?

>

 

Create a new combo project VCL+ISAPI. Move your forms and modules from old

project to new one.

 

 

.

 

Link to comment
Share on other sites

Message from: "Farshad Mohajeri"

 

Hi,

 

VCL mode is not much different than a regular delphi app, so it seems to =

be related to database components and the way you use them.=20

 

 

In VCL mode get the same error:

 

The query in login work fine. This second query break with this error.

The difference between them is where they are placed. The first are in =

MainModule with TDatabase, the second are into second form conected to =

first TDatabase. Each query with your respective transaction. Only share =

the Tdatabase.

 

 

 

Link to comment
Share on other sites

Message from: "Luis Diaz"

 

El 18/01/2011 21:32, Farshad Mohajeri escribió:

> so it seems to be related to database components and the way you use

> them.

Well. My way to use unigui is corect?

I study about use of Interbase components.

Thk.

.

 

Link to comment
Share on other sites

Message from: "Farshad Mohajeri"

 

"Luis Diaz" wrote in message

news:Q4z%23IA1tLHA.2164@anaxagvs227...

> El 18/01/2011 21:32, Farshad Mohajeri escribió:

>> so it seems to be related to database components and the way you use

>> them.

> Well. My way to use unigui is corect?

> I study about use of Interbase components.

> Thk.

 

Yes, you can use MainModule and Forms for non-visual Data components.

Good practice is to put non-visual data components in MainModule and other

DataModules created from uniGUI wizard.

 

 

.

 

Link to comment
Share on other sites

  • 4 weeks later...

Message from: "Sergio"

 

Hola Luis!

 

your problem is not unigui related at all. I bet you have a second SQL

that uses the user id as a parameter, something like:

 

Select * from messages where userid=:ID

 

OK, in this case, you need to do a TTable.prepare; just beffore you can

assign a value to :ID and execute the query, for instance:

 

MyTable.SelectSQL.Text:= 'select * from messages where userid=:ID';

MyTable.prepare;

MyTable.Params[0].value:= 'Pepe'; //The user ID from 1st. query

MyTable.Open;

 

Hope it helps you.

Sergio (Spain).

 

 

Luis Diaz wrote:

 

> El 18/01/2011 18:10, Junior/RO escribió:

> > Luis Diaz escreveu:

> >

> > > What it's a better components to access to Firebird with unigui?

> > I am using Zeos, but only the trunk version of development of Zeos

> > works well with Delphi 2010.

> I try Interbase components, but I get error when put a

> TIbSql+TIBtransaction in a form created in runtime. I do not

> understand how I should use the data access compenentes. My scenario

> is: In a MainModule put:

> -- One IBDatabase for use for all forms

> -- One IbSql+IbTransaction for validate user and password in login

> form. Login form is a panel in Main Form. From Main form call to

> second form (created at runtime) with one IBsql+Ibtransaction for

> search data form. Login form works well, bat in the second form I

> get error "unprepared statament" when execute the query. And I can

> not find a solution to the problem...

 

.

 

Link to comment
Share on other sites

Message from: "Luis Diaz"

 

El 11/02/2011 16:00, Sergio escribió:

> Hola Luis!

>

> your problem is not unigui related at all. I bet you have a second SQL

> that uses the user id as a parameter, something like:

>

> Select * from messages where userid=:ID

>

> OK, in this case, you need to do a TTable.prepare; just beffore you can

> assign a value to :ID and execute the query, for instance:

>

> MyTable.SelectSQL.Text:= 'select * from messages where userid=:ID';

> MyTable.prepare;

> MyTable.Params[0].value:= 'Pepe'; //The user ID from 1st. query

> MyTable.Open;

>

> Hope it helps you.

> Sergio (Spain).

>

>

> Luis Diaz wrote:

>

>> El 18/01/2011 18:10, Junior/RO escribió:

>>> Luis Diaz escreveu:

>>>

>>>> What it's a better components to access to Firebird with unigui?

>>> I am using Zeos, but only the trunk version of development of Zeos

>>> works well with Delphi 2010.

>> I try Interbase components, but I get error when put a

>> TIbSql+TIBtransaction in a form created in runtime. I do not

>> understand how I should use the data access compenentes. My scenario

>> is: In a MainModule put:

>> -- One IBDatabase for use for all forms

>> -- One IbSql+IbTransaction for validate user and password in login

>> form. Login form is a panel in Main Form. From Main form call to

>> second form (created at runtime) with one IBsql+Ibtransaction for

>> search data form. Login form works well, bat in the second form I

>> get error "unprepared statament" when execute the query. And I can

>> not find a solution to the problem...

Thanks for information. I now use ZeosLib and work fine.

 

.

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...