Jump to content

Big problems with mySQL Database if more than one User is connected


erich.wanker

Recommended Posts

Hello ..

i become error "0 record(s) updated. Only one record should have been updated" if user B is add a new record in the same table in which user A has created a new record 1 minute bevore ??

ANY IDEA whats wrong ??

the software works fine in all things - but just if 1 user is working with it ... if more users are working - then "0 record(s) updated error" comes - since the user refreshes the page ..

the used libmysql.dll is 5.5.27.0

 

Databas: mySQL • Version: 5.7.29 - MySQL Community Server (GPL) • connected with: Zeos 7.2.6-stable

Connection is in MainModule - All my ZQuery have  "wmWhereKeyOnly" as WhereMode and "umUpdateChanged" as UpdateMode (CachedUpdates = false) ShowRecordTypes =[usUnmodified,usModified,usInserted]

Code:
object ZConnection1: TZConnection
    ControlsCodePage = cCP_UTF16
    AutoEncodeStrings = True
    Catalog = ''
    Properties.Strings = (
      'controls_cp=CP_UTF16'
      'CLIENT_FOUND_ROWS=1'
      'AutoEncodeStrings=ON')
    TransactIsolationLevel = tiReadCommitted
    HostName = ''
    Port = 3306
    Database = 'datenbank'
    User = 'karotte'
    Password = ''
    Protocol = 'mysqld-5'
    LibraryLocation = 'C:\Server\htdocs\libmysql.dll'
    Left = 52
    Top = 28
  end
 
 
 
Link to comment
Share on other sites

solved it :-)

 

ThanX for trying to help !!!!!!!!!!!!!!!!!!!!!!!

 

The error was a other field what i filled with following function

(a handmade counter thing..)

 

function TUniMainModule.new_id: Integer;
var
  i: Integer;
begin
  GET_INR.Refresh;            <-------- THIS SOLVED MY PROBLEM !!!!!!!

  i := GET_INR.fieldbyname('id').Asinteger;
  i := i + 1;
  GET_INR.Edit;
  GET_INR.fieldbyname('id').Asinteger := i;
  GET_INR.Post;

  Result := i;
end;

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...