Skip to Main Content

MySQL Database

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

CHANGE THE OUTPUT TO INSERT DATA TO MYSQL'S TABLE

Joao Valencio SilvaAug 10 2018 — edited Aug 12 2018

Hello,

Please, I need help to change the output of the following code,

I need the output to be to fill the column named `combinations`, that belongs to the table named `table1` of the MySQL's database named `numbers`.

At the moment, the results are displayed to the console, and I need to change it to fill a specified column of a table in MySQL.

Regards,

John

class Permutation {

    static void combinationUtil(int arr[], int data[], int start,

                                int end, int index, int r)

    {

        if (index == r)

        {

            for (int j=0; j<r; j++)

            System.out.print(data[j]+" ");

            System.out.println("");

            return;

        }

        for (int i=start; i<=end && end-i+1 >= r-index; i++)

        {

            data[index] = arr[i];

            combinationUtil(arr, data, i+1, end, index+1, r);

        }

    }

    static void printCombination(int arr[], int n, int r)

    {

        int data[]=new int[r];

        combinationUtil(arr, data, 0, n-1, 0, r);

    }

    public static void main (String[] args) {

        int arr[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11};

        int r = 6;

        int n = arr.length;

        printCombination(arr, n, r);

    }

}

Comments

Gbenga Ajakaye

Check this other thread with similar error and some suggested solution from @Jeff Smith Sqldev Pm-Oracle.

Sql Developer 4.1.2 on Windows 7 64 bit doesn't start

Kvark

Already, do not help, that is why i create that topic, as see in many places people start asking that question... so I am not alone who have this issue.

thatJeffSmith-Oracle

the jars got corrupted or missing. delete everything, unzip the files again, and what archive software are you using to get the files out of the ZIP?

Kvark
Answer

Manage to run it! I can't explain that, but once I move sqldeveloper folder to the root of C:\ drive - its finally start fine!

Seems its a bug in it to find a required libraries if its saved somewhere else and not in C:\ drive

Marked as Answer by Kvark · Sep 27 2020
1 - 4

Post Details

Added on Aug 10 2018
1 comment
88 views