Question: I've been working recently on "How to import excel files into database's tables". In this case, I have a column with bit data type. Meanwhile in Java I have a variable with boolean data type. The question is, can I convert boolean data type into bit data type in Java then use the converted value to store it into the table? Here's the script i've been working on recently

```
boolean isDiscount = (boolean) nextCell.getBooleanCellValue();
statement.setBoolean(8, isDiscount);

```

Answer: 
try to access ref using `current` and it should work

```
this.flatRef.current.scrollToIndex({index: monthName.length > this.state.currentindex ? this.state.currentindex++ : this.state.currentindex });

```
Instead of using a `FlatList` I would suggest you to make a `state` variable and execute it like this

Working example - [Here](https://snack.expo.io/@kartikeyvaish/flatlist-scroll-example)

```
import * as React from 'react';
import { Text, View, StyleSheet } from 'react-native';
import { AntDesign } from '@expo/vector-icons';

...

  const [SelectMonth, SetSelectMonth] = React.useState(monthName[0]);

  const NextPress = () => {
    if (SelectMonth.id !== 12) {
      let temp = monthName.find((c) => c.id === SelectMonth.id + 1);
      if (temp) {
        SetSelectMonth(temp);
      }
    }
  };

  const PrevPress = () => {
    if (SelectMonth.id !== 1) {
      let temp = monthName.find((c) => c.id === SelectMonth.id - 1);
      if (temp) {
        SetSelectMonth(temp);
      }
    }
  };

  return (
    <View style={styles.container}>
      <View style={styles.CalenderBox}>
        <AntDesign
          name="caretleft"
          size={30}
          color="black"
          onPress={() => PrevPress()}
        />

        <View style={styles.MonthNameBox}>
          <Text style={{ fontWeight: 'bold', fontSize: 24 }}>
            {SelectMonth.name}
          </Text>
        </View>

        <AntDesign
          name="caretright"
          size={30}
          color="black"
          onPress={() => NextPress()}
        />
      </View>
    </View>
  );

```