Board index » delphi » PLEASE HELP MEEEEEEEEEEEE!!!!!

PLEASE HELP MEEEEEEEEEEEE!!!!!

Hi everybody!!

    I know my english is so bad but let's try!! I'm working with DELPHI 3
and MSSQL 6.5, and i'm having problems with a multiple indexed query! I'm
using a Query with INNER JOIN, and to update it, i'm using UPDATESQL. I need
REFRESH my query but if I use

            Tabel1.REFRESH;

    Delphi says, ' Table does not suport this operation because it's not
uniquely indexed'

    What could I DO???

                                                Thanks
                                                                Rodrigo

 

Re:PLEASE HELP MEEEEEEEEEEEE!!!!!


Quote
Edufa wrote:

> Hi everybody!!

>     I know my english is so bad but let's try!! I'm working with DELPHI 3
> and MSSQL 6.5, and i'm having problems with a multiple indexed query! I'm
> using a Query with INNER JOIN, and to update it, i'm using UPDATESQL. I need
> REFRESH my query but if I use

>             Tabel1.REFRESH;

>     Delphi says, ' Table does not suport this operation because it's not
> uniquely indexed'

>     What could I DO???

>                                                 Thanks
>                                                                 Rodrigo

Its hard to say, you didn't provide enough information.  Try isolating
the table/index problem by setting up a test form with just the table
and an okbutton. On click test your table1.refresh.  I'm just starting
with sql but shouldn't you query1.refresh?

Re:PLEASE HELP MEEEEEEEEEEEE!!!!!


Quote
>    What could I DO???

  You could try adding an index to the table which would make each record
Unique. All tables should have unique indexes, it makes it easier for a SQL
engine to find a particular record, otherwise it may have to work off
secondary indexes (assuming there are any) or worse, do a table-scan.

- Ian Sparks.

Re:PLEASE HELP MEEEEEEEEEEEE!!!!!


Rodrigo,

You have to re-execute the query

DAn...

Edufa <ed...@martinus.com.br> wrote in article
<64et0j$s...@forums.borland.com>...

Quote
> Hi everybody!!

>     I know my english is so bad but let's try!! I'm working with DELPHI 3
> and MSSQL 6.5, and i'm having problems with a multiple indexed query! I'm
> using a Query with INNER JOIN, and to update it, i'm using UPDATESQL. I
need
> REFRESH my query but if I use

>             Tabel1.REFRESH;

>     Delphi says, ' Table does not suport this operation because it's not
> uniquely indexed'

>     What could I DO???

>                                                 Thanks
>                                                                 Rodrigo

Re:PLEASE HELP MEEEEEEEEEEEE!!!!!


Rodrigo,

I forgot to say that result sets from query's are not necessarily indexed
even though the underlying tables are.

Dan...

Edufa <ed...@martinus.com.br> wrote in article
<64et0j$s...@forums.borland.com>...

Quote
> Hi everybody!!

>     I know my english is so bad but let's try!! I'm working with DELPHI 3
> and MSSQL 6.5, and i'm having problems with a multiple indexed query! I'm
> using a Query with INNER JOIN, and to update it, i'm using UPDATESQL. I
need
> REFRESH my query but if I use

>             Tabel1.REFRESH;

>     Delphi says, ' Table does not suport this operation because it's not
> uniquely indexed'

>     What could I DO???

>                                                 Thanks
>                                                                 Rodrigo

Re:PLEASE HELP MEEEEEEEEEEEE!!!!!


Edufa <ed...@martinus.com.br> wrote in article
<64et0j$s...@forums.borland.com>...

Quote
>     Delphi says, ' Table does not suport this operation because it's not
> uniquely indexed'

I'm not sure about D3.0, but in D2.0, Queries really don't support refresh
- only tables do, even though the documentation says that queries do.  To
do a refresh, Close and reopen the query - that's the only way in D2.0

Connie

Re:PLEASE HELP MEEEEEEEEEEEE!!!!!


Quote
Connie Okiro wrote:
> Edufa <ed...@martinus.com.br> wrote in article
> <64et0j$s...@forums.borland.com>...
> >     Delphi says, ' Table does not suport this operation because it's
> not
> > uniquely indexed'

> I'm not sure about D3.0, but in D2.0, Queries really don't support
> refresh
> - only tables do, even though the documentation says that queries do.
> To
> do a refresh, Close and reopen the query - that's the only way in D2.0

> Connie

TQuery in D3.0 doesn't support refresh => close, open, etc...

Fran?ois Delaby.

Other Threads