Subject | RE: [IBO] Re: Prepare in IBquery - Help me!!!! |
---|---|
Author | Claudio Valderrama C. |
Post date | 2001-01-02T04:50:12Z |
Ans what do you expect? That IBO guesses that the user has no privileges?
:-)
IBO prepares the statement in advance, for efficiency. If you need more
flexible power, use more flexible options:
- Have a TIB_DSQL for your Update statement.
- Have a TIB_DSQL for your Delete statement.
- Have a TIB_DAQL for your Insert statement.
I don't know if you plan to query system tables to see if some user is
allowed to modify data. How did you expected this to happen? Black magic?
- Then, instead of putting text in the TIB_Query's EditSQL property, write
it in the TIB_DSQL for update and the same for the other two actions.
- Try preparing the DSQLs and trap the exception. The one that can be
prepared is because the user has permission. This is a brute force approach.
Keep a flag for the ones that succeeded.
- Hook the OnCustomDelete, OnCustomEdit and OnCustomInsert events of the
TIB_Query. For example, in the OnCustomDelete event, check that the flag
variable for the TIB_DSQL where you wrote your delete statement is marked as
success. If it's, then feed the parameters if the delete TIB_DSQL and
execute it; otherwise, reject the operation. Do the same for update and
insert, too.
C.
:-)
IBO prepares the statement in advance, for efficiency. If you need more
flexible power, use more flexible options:
- Have a TIB_DSQL for your Update statement.
- Have a TIB_DSQL for your Delete statement.
- Have a TIB_DAQL for your Insert statement.
I don't know if you plan to query system tables to see if some user is
allowed to modify data. How did you expected this to happen? Black magic?
- Then, instead of putting text in the TIB_Query's EditSQL property, write
it in the TIB_DSQL for update and the same for the other two actions.
- Try preparing the DSQLs and trap the exception. The one that can be
prepared is because the user has permission. This is a brute force approach.
Keep a flag for the ones that succeeded.
- Hook the OnCustomDelete, OnCustomEdit and OnCustomInsert events of the
TIB_Query. For example, in the OnCustomDelete event, check that the flag
variable for the TIB_DSQL where you wrote your delete statement is marked as
success. If it's, then feed the parameters if the delete TIB_DSQL and
execute it; otherwise, reject the operation. Do the same for update and
insert, too.
C.
> -----Original Message-----
> From: Marcilio Soares [mailto:marcilio.soares@...]
> Sent: Jueves 21 de Diciembre de 2000 11:11
>
> My system have user and privis... with select and select/update.
> the ib_query always prepare all query's(SQL,delete,insert,update) but
> see error message when open my query.
> How to ibquery not prepare all query's.
>
>
> --- Em IBObjects@egroups.com, Svein Erling Tysvær
> <svein.erling.tysvaer@k...> escreveu
> > Of course you get an error message if you try to update a table
> without
> > update/write access!
> >
> > What do you expect to happen?
> >
> > Set
> >
> > At 14:30 21.12.2000 -0000, you wrote:
> > >Helen,
> > >there is message:
> > >
> > >ISC ERROR CODE:335544352
> > >
> > >ISC ERROR MESSAGE:
> > >no permission for update/write access to table NOMES
> > >
> > >STATEMENT:
> > >TIB_Cursor: "frmWISQL.crEdit"
> > >
> > >I'm using the IB_Wisql with Cursor|sql page:
> > >UPDATE NOMES SET
> > >ID=:ID,
> > >NOME=:NOME,
> > >DATA=:DATA
> > >WHERE ID=:ID
> > >
> > >The user have only grant select in the table NOMES.
> > >
> > >
> > >--- Em IBObjects@egroups.com, Helen Borrie <helebor@w...> escreveu
> > >> At 12:31 PM 21-12-00 +0000, you wrote:
> > >> >I try but IB_Query show me the msg "no permission...bla bla"
> > >> >Help me!!!!
> > >>
> > >> Calm down....this message means what it says - you have have no
> > >permissions
> > >> for this table.
> > >>
> > >> Let's do a bit of even-headed testing here.
> > >>
> > >> Get a copy of IB_WISQL.exe from the Downloads page of
> > >www.ibobjects.com
> > >>
> > >> Connect to the database using the SAME username, password and
> path
> > >that you
> > >> used in your application.
> > >>
> > >> Copy the SQL from your IB_Query and submit it on the Cursor |
> SQL
> > >page of
> > >> IB_Wisql.
> > >>
> > >> Click the Prepare button.
> > >>
> > >> If there is no error message, click the blue book button to
> fetch
> > >the dataset.
> > >>
> > >> Click the 'Last' button to fetch all the rows (this is the >|
> > >button on the
> > >> navigation bar).
> > >>
> > >>
> > >> Report back to the list what you see.
> > >>
> > >> You might also get some useful information by activating the
> > >Monitor dialog
> > >> in IB_WISQL and watching what is going to the server.
> > >>
> > >> Helen
> > >>
> > >> All for Open and Open for All
> > >> InterBase Developer Initiative · http://www.interbase2000.org
> > >> _______________________________________________________
> > >
> > >
> > >
> > >
> > >
> > >
>
>
>
>
>
>