heidi sql grid editing error: column #4 not available

filip20's profile image filip20 posted 2 months ago in General Permalink

I get this error when I try to add a new row to Data table.

I created 2 tables before this one and it worked fine, but with this one I can't add data to the table.

Like this: I am placed in table e.x. "reservations". Then I head to Data tab and down there I do right click "Insert row". And then I got this error.

ansgar's profile image ansgar posted 2 months ago Permalink

Please post the result of SHOW CREATE TABLE reservations; here.

And please verify you are using the latest release 12.8 or even better the latest nightly build.

filip20's profile image filip20 posted 2 months ago Permalink

This is the result of "show create table":

CREATE TABLE `rezervacija` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `korisnik_id` int(11) NOT NULL,
  `knjiga_id` int(11) NOT NULL,
  `datum_rezervacije` date NOT NULL,
  `datum_otkaza` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `korisnik_id` (`korisnik_id`),
  KEY `knjiga_id` (`knjiga_id`),
  CONSTRAINT `rezervacija_ibfk_1` FOREIGN KEY (`korisnik_id`) REFERENCES `korisnik` (`id`) ON DELETE CASCADE,
  CONSTRAINT `rezervacija_ibfk_2` FOREIGN KEY (`knjiga_id`) REFERENCES `knjiga` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci

And version of MariaDB is: 10.5.26-MariaDB-0+deb11u2

ansgar's profile image ansgar posted 2 months ago Permalink

I created your rezervacija table here (plus two dummy tables korisnik and knjiga before, not included above).

In the data grid I don't get that "column #4 not available" error like you.

Please make sure you are using the latest HeidiSQL build. Have a look at Help > "Check for updates" if you're unsure.

Please login to leave a reply, or register at first.