Copy table from DB1 into table from DB2

I have found an example for this on this forum. I have it implemented in my app and the code looks like this:

dim remDB as new FolderItem
remDB = SyncDBRemoteDBFile
dim locDB as new FolderItem
locDB = SyncDBLocalDBFile

if SyncDBRemote.Connect and SyncDBLocal.Connect then

If SyncDBRemote.AttachDatabase(remDB, "remoteDB") Then
  If SyncDBLocal.AttachDatabase(locDB, "localDB") Then
    SyncDBRemote.sqlExecute "begin transaction" 
    SyncDBRemote.SQLExecute("INSERT INTO remoteDB.users (uname, ufirstname) SELECT uname, ufirstname FROM users")
    
    If SyncDBRemote.Error Then
      MsgBox("DB Error: " + SyncDBRemote.ErrorMessage)
      if SyncDBLocal.Error then
        MsgBox("DB Error: " + SyncDBLocal.ErrorMessage)
      end if
      
      SyncDBRemote.commit
      SyncDBLocal.Commit
      
    Else
      LoadFromRemoteDB
      Infoline.Text = "Database sync was successfully"
    End If
    
  end if
end if

end if

But no new record are in DB2 (remoteDB). What is wrong? When I change "user into “localDB.users” I got the error “There is no table users”.