Question: cursor.execute("""
INSERT INTO login (login\_ID, username, password) VALUES
(1, 'jguyg0', 'jhbbh'),
(2, 'fgcghj', 'mujh'),
(3, 'ffhiuh', 'aphu'),
(4, 'ugyug', 'clear'),
(5, 'knuin', 'Proae'),
(6, 'uygy', 'mats'),
(7, 'ewawez', 'fre'),
(8, 'hjbgbi', 'initive'),
(9, 'iuhui', 'Opene'),
(10, 'lhuh', 'upward');
...........................
(11, 'ajhiyg0', 'func'),
(20, 'akhikhk', 'Reverneered');

""")

```
I'm getting a no column named error and I can't seem to figure out why? I've found a few syntax error but after that it still doesn't work

```

Answer: 
Your problem is that you're mutating your state, so the equals used in the flow always returns true.

Change this

```
internal fun updateFirstName(name: String) {
    screenData.firstName = name
    updateScreenData()
}

private fun updateScreenData() {
    viewModelScope.launch {
        _screenDataFlow.emit(screenData.copy())
    }
    println()

}

```

to

```
internal fun updateFirstName(name: String) {
    viewModelScope.launch {
        _screenDataFlow.emit(screenData.copy(firstName = name))
    }
}

```
In your case your `MutableStateFlow` holds a link to a mutable value, that's why when you pass the value which `hashcode`(which is calculated on all field values) is identical, the flow doesn't update the value.

Check out [Why is immutability important in functional programming?](https://www.quora.com/Why-is-immutability-important-in-functional-programming)

`data class` is a nice tool to be used, which will provide you all `copy` out of the box, but you should emit using `var` and only use `val` for your fields to avoid mistakes.

Also, with `MutableStateFlow` you always have access to `value`, so you don't need to store it in a separate variable:

```
class RegistrationViewModel : BaseViewModel() {

    private val _screenDataFlow = MutableStateFlow(CreateAccountRegistrationScreenData())
    internal val screenDataFlow = _screenDataFlow.asStateFlow()

    internal fun updateFirstName(name: String) {
        _screenDataFlow.update { screenData ->
            screenData.copy(firstName = name)
        }
    }
}

```