I'm trying to learn flutter by myself so i've decided to make an app.
I admit that i have difficulties to make a database correctly so i've copied the code for the database from an opensource app.
Basically the copied app creates notes object which have a title, description date, id.
Now what i want is to add another attribute to the object (dateexamen) (String)
What I have :
I've a main.dart, a database.dart, model folder within a note.dart, a Screen folder within a page with a listView and a floating button to another page for modifying/add/deleting object.
My object has :
Name
Description
Date created
Priority
Dateexamen (I make everything to add this one)
When i click on the floatingbutton an object is created and then the form page opens and updates the object just created.
So what i did ?:
I've just went into the note.dart, added my attribute dateexamen everywhere juste like everything was inside it and did this for all the file.
I don't have any crashes, but now it doesn't want to create any object, it works again when a delete my modification to all files..
There is the error in the console :
E/SQLiteLog( 4684): (1) table note_table has no column named
dateexamen E/flutter ( 4684):
[ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception:
DatabaseException(table note_table has no column named dateexamen
(code 1 SQLITE_ERROR): , while compiling: INSERT INTO note_table
(title, description, priority, date, dateexamen) VALUES (?, ?, ?, ?,
?)) sql 'INSERT INTO note_table (title, description, priority, date,
dateexamen) VALUES (?, ?, ?, ?, ?)' args [a, b, 2, Jul 13, 2019,
Sunday, July 14, 2019 at 12:00PM]}
There is the link to the app repo: https://github.com/fakman99/flutter_first/
Thank's in advance for your help, i'm very excited about flutter and i need to understand how database and backend works with flutter.
Have a good day, Fatih
It is likely that anyone who tries your application will not get the error you get. My guess is that you ran the application once before adding your new columns so indeed the column does not exist yet. In sqlite, once the tables are defined, unless you drop/recreate them, columns must be added manually.
Once solution for this is to bump the version number and modify (or simply drop/create the table) during the onUpgrade callback. We can call this a schema migration process. There is an example here: https://github.com/tekartik/sqflite/blob/master/sqflite/doc/migration_example.md.
One quick test on your side is to simply uninstall your app, or delete the app data before trying you code again => magic, it works!
It seems that you just adjust the objects, but not the database itself.
Search for the openDatabase
openDatabase(join(await getDatabasesPath(), 'cache.db'),
onCreate: (db, version) {
return db.execute(
'CREATE TABLE cache(timestamp INTEGER, query TEXT PRIMARY KEY, data TEXT)');
}, version: 1)
and adjust the create table according to your needs. (change version or wipe app data.) retry....
Every time I click on any page in the backend I get 6 DB Errors, that look very similar to this one, in total 3 different SELECT errors for the table lawyer and 3 for the table student:
caller TYPO3\CMS\Core\Database\DatabaseConnection::exec_SELECTquery
ERROR Table 'db_lawclinic47.tx_lcapp_domain_model_lawyer' doesn't exist
lastBuiltQuery SELECT uid FROM tx_lcapp_domain_model_lawyer
WHERE pid=24 AND tx_lcapp_domain_model_lawyer.deleted=0
AND (tx_lcapp_domain_model_lawyer.t3ver_state <= 0 OR
tx_lcapp_domain_model_lawyer.t3ver_wsid = 0) LIMIT 1
debug_backtrace require(25/typo3/sysext/recordlist/mod1/index.php),25/typo3/mod.php#32 //
TYPO3\CMS\Recordlist\RecordList->main#31 //
TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRecordList->generateList#332 //
TYPO3\CMS\Core\Database\DatabaseConnection->exec_SELECTgetSingleRow#410 //
TYPO3\CMS\Core\Database\DatabaseConnection->exec_SELECTquery#406 //
TYPO3\CMS\Core\Database\DatabaseConnection->debug#305
Those tables really don't exist because I renamed some and deleted some...and my webpage is working fine, so somehow those new tables are used, but there seems to be something old that is trying to select from the old tables and I have no idea what it could be and how to find it and get rid of it. Any clues?
You have an extension installed (probably with key lcapp) that requires these tables. If you don't need that functionality any longer, you should uninstall that extension in the Extension Manager.
Also, if the database was manipulated by some other tool than TYPO3 itself, you should check the database structure in the Install Tool. It can tell you about missing tables, fields that are not as specified and so on.
The database definitions for an extension are stored in the file ext_tables.sql in root of the extensions install directory, the Install Tool compares against these definitions.
I have an Ms Excel file listing the users of my application. This file contains a set of informations of them(firstname, lastname, email...) but it does not contain the password and of course the Id fields. I want to load this file into the AspNetUsers table defined by the Ms Identity framework. How could i do this task?
thanks for your help
what i can suggest to you is to creat a consolen application or maybe a test Which can get the items from excel and isert them in sql by EF
I am trying to edit configurable product and getting error. I am using Magento version 2.1.2
Steps to reproduce:
Go to admin -> Stores -> Configuration -> Sales -> Google API section
Change the configuration Enable Content Experiments to "Yes"
Save a configurable product and its child product consecutively.
Expected result:
Product should be save successfully with any number of times.
Actual result:
failed to save product
getting bellow error:
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry
'0-402-product' for key
'GOOGLEOPTIMIZER_CODE_STORE_ID_ENTITY_ID_ENTITY_TYPE', query was:
UPDATE googleoptimizer_code SET entity_id = ? WHERE (code_id='136')
Anyone can help me to fix this issue?
I found the solution. To fix this issue I edit configurations options and its worked for me. please refer this link http://prntscr.com/e7px78
Oracle ATG OOTB dones not provide a option to select all list type items and deleting all in a single click.
Ex: Create a BCC project, Go to any particular product and you will find many SKU's for that product(if it was already added). There is a "-" symbol to delete against eack and every SKU to delete but i wanted to delete the SKU's that the count is 500 on my catalog where i can not click in "-" symbol 500 times.
Pleas help me on this.
Thanks in advance
I think you should have at least 2 options:
The assets management in the BCC, It should named like 'Site
Assets' or 'Browse Assets', it supports multi-select:
Use the startSQLRepository. You should create several fake
datasource and an xml include of a lot of remove-item, then create
an BCC project with startSQLRepository, deploy it in BCC then you
are all done. For more information, see the docs here
and here.