I'm new to SQL, coming from a using XBase table background.
But I am writing an internet app now and have to use mySQL.
I have started off using myQuery components but recently decided that myTable might be more appropriate. As I understand it, if I make a query with myQuery, and then if anyone else adds a new record (including myself), if I want to see that record then I have to re-establish myQuery active:=false active:=true ... something like that.
Can myTable "see" a new record that someone else adds without doing anything "special"?? A general short advantage/disavantage of myQuery vs myTable would be helpful, if such a link is available.
Thanks in advance,
Bob
myQuery vs myTable
-
swierzbicki
- Posts: 451
- Joined: Wed 19 Jan 2005 09:59
Hi Rober,
Hope you will enjoy it !
Please note that TmyQuery is a more powerfull component : you can create sophisticated SQL statement to retreive datas from differents tables for example... I can't remember when I used a TmyTable component for the last time
- "mytable.refresh" for refreshing the whole table
- "mytable.refreshrecord" for refreshing ht e current record
Welcome to the Delphi worldI'm new to SQL, coming from a using XBase table background.
TmyTable basically list available tables in the database. When choosing a Table and opening it, TmyTable will simply perform a "Select * from YourTableName" query. You can get the same result with a TmyQuery component : just fill the SQL property with the correct SQL Statement.I have started off using myQuery components but recently decided that myTable might be more appropriate...A general short advantage/disavantage of myQuery vs myTable would be helpful
Please note that TmyQuery is a more powerfull component : you can create sophisticated SQL statement to retreive datas from differents tables for example... I can't remember when I used a TmyTable component for the last time
Well, simply do :Can myTable "see" a new record that someone else adds without doing anything "special"??
- "mytable.refresh" for refreshing the whole table
- "mytable.refreshrecord" for refreshing ht e current record