Re[2]: transaction support

2004-01-06 Thread DeBug
[MySQL]
1: START TRANSACTION
2: WITHDRAW $50 from account 32146.
3: DEPOSIT $50 into account 12345.
4: LOG transfer (date/time/teller/etc...) for auditing.
5: COMMIT TRANSACTION

DK It depends why step 3 failed.
DK If you want to rollback the transaction to the beginning on any error,
DK you simply use an 'on error' statement in VB to trap the error, and send 
DK a rollback command when the error is detected.
And what if the server lost connection with client computer ?
there must be automatic rollback after certain 'time-out' period

Data integrity logic should be ensured by client application (when to
call 'start transaction' and when to call 'commit'), the server task is to
ensure that logic - i.e. that at any given moment users see the
database in integrity state and not at some point within transaction processing.
If user has not commited transaction the database integrity state is
still at the point before start transaction was called.

Not user but server is responsible for rolling back not commited
transactions, user can only help relief the server from major part of this problem by 
trying to
rollback as many failed transactions as he can. however user cannot be
responsible for rolling back all the transactions



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re[3]: transaction support

2004-01-06 Thread DeBug
correction:

D Data integrity logic should be ensured by client application

should be read as:

Data integrity logic should be defined by client application



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re[2]: two tables

2003-12-19 Thread DeBug
is there any difference between:
a)
select lname, fname
from person_tb, details_tb
where mem_id = det_id
and fin = y;

and

b)
select lname, fname
from person_tb
where mem_id in (select det_id from  details_tb where fin = y)

which one will execute faster ?



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re[2]: Comparing date fields

2003-12-16 Thread DeBug
mysql select projects.name from projects
JB - where projects.closeddate between :fd and :td;
JB ERROR 1064: You have an error in your SQL syntax near ':fd and :td' at
JB line
JB 2
JB What are those colons?

He probably uses Delphi or C++Builder to connect to mysql via TQuery
component. TQuery has a property SQL where sql statement is stored.
The colon ':' means that fd is a parameter whose value should be
inserted into TQuery.SQL statement just before executing the query.

The solution is to substitute :fd with a real value directly by accessing TQuery.SQL
property.
Query.SQL.Clear;
Query.SQL.Add('select ...');
Query.SQL.Add('where projects.closeddate between 01/01/01 and 01/01/02');
Query.Open;



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re[2]: Find duplicates query

2003-12-09 Thread DeBug
select ID from YourTable
group by ID
having count(ID)  1



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re[2]: Security Question

2003-11-27 Thread DeBug
- Someone copies the DB files to another box, starts a mysql
instance, loads the DB and presto - views the 'private' data !!!


PD Sure.  That's why you establish filesystem level access privileges so that
PD only the mysql user can copy them in the first place.

Some DBMSs allow to setup databases on a separate partition with its
own filesystem that will have nothing in common with OS filesystem.
OS is unable to read DBMS filesystem data.
So getting root on OS does not give the hacker access to the DBMS file
system and only DBMS users can access it.



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re[2]: assorted: foreign keys, mult databases, and crashes

2003-10-15 Thread DeBug
 How does one restore a mysql database if it crashes in
 the middle of a large operation?

RB Not sure what you mean...

What if i on purpose turn off the computer when mysql is in the middle of
transaction execution ? Will the server on restart automatically
rollback the crashed transaction ?



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re[2]: printing reports

2003-10-08 Thread DeBug
 1.) If you want to have an easy way tool for creating your reports -
 use MS Access
Yep if you know Access

WF --  Tools are for dummy users, Clever users create tools. --
Clever users select the best way they can do things for themselves
What is best depends on user knowledge and objectives ( best could mean
cheapest or fastest or least learning curve or steepest
learning curve etc etc )

For me for example having Borland C++ Builder and Rave Reports and
being skilled in working with these tools the best would probably mean to
convert c++ code in question from MS Visual Studio to Borland C++ Builder and use
Rave as reporting tool (BTW Rave has PDFRenderer and HTMLRenderer to
convert Rave reports to PDF and HTML)

For those who used to work with Crystal Reports the best would probably mean
working with Crystal Reports.



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]