I am using the sqlite plugin in my Ionic App
https://ionicframework.com/docs/native/sqlite/
databaseName = 'offline.db';
destoryDatabase(){
this.sqlite.deleteDatabase({ name: this.databaseName, location: 'default'});
}
I tried this code it throwing an error. destroyDatabase does not exist. But the function does exists maybe the code might be wrong. Please Help.
Check your code carefully, because:
In the code it says: "destoryDatabase(){" .
It may be because you didn't close the "}" and also the name is wrong.
But you wrote that the function "destroyDatabase" exists.
As you can see, they're not the same at least in typo.
Check that and please add more code.
Related
I have a problem when I tried to integrate tiki with my LDAP server. In the test_ldap.php I wrote the code to debug according to this website (https://doc.tiki.org/LDAP%20authentication). This code returned a success. So I know that my LDAP is working fine. I have a problem at
$entry = Net_LDAP2_Entry::createConnected($this->_ldap, $this->_entry);
In the shiftEntry function in Search.php. When I return debug in here, it goes to ClassLoader.php and it go to
register_shutdown_function(function () {
TikiLib::events()->trigger('tiki.process.shutdown', []);});
In my opinion, maybe the problem is the
spl_autoload_call
The spl_autoload_call function called Net_LDAP2 which extends PEAR somewhere before this line in Search.php. This would lead both Net_LDAP2 and PEAR and PEAR_ERROR... Then when it comes to Net_LDAP2_Entry class, it would also load PEAR.... Would this create a fatal error?
I keep having blank screen in my tiki. Tried to cut the code from Search.php to the test_ldap.php to test. It has the same problem.
I am using:
Version 16.2
OS: Clear OS
Thanks for your help. I am blocked now.
I think this may be a good start: https://dev.tiki.org/item6283. If you look in the comments by albertgi he states changing some function names in PEAR.php. I was having LDAP integration problems and this was one of the key problems.
On one of my pages I get a "Failed to execute 'insertBefore' on 'Node':". I've checked the code headers, etc and can't find why. The code I'm using is
https://github.com/beeker1121/exit-intent-popup
After going through the code. I found that the code is looking for "" tag in the . If you put a blank one in there the code will work. hope this helps someone.
I've bumped into a problem when trying to update my database. I Changed a FK and the virtual property inside my model. When I try to update the database now I'm getting this error:
Either the parameter #objname is ambiguous or the claimed #objtype (COLUMN) is wrong.
On this line code it stops the update-database:
RenameColumn("dbo.test", "test_Id", "ProgramId");
And the -verbose attribute is showing me that this line of code is giving me the error:
EXECUTE sp_rename #objname = N'dbo.test.test_Id', #newname = N'ProgramId', #objtype = N'COLUMN'
I don't know why it is giving me this error, does anyone know what is going wrong with the automatically generated migration file?
Thanks, Brent
I tried whay you said in my project which was using EF Core, I didn't get just RenameColumn in migration class, I got :
DropForeignKey(...) ,
DropIndex(...) ,
DropColumn(..)
and then AddColumn(...),
CreateIndex(...) and
CreateForeignKey(...)
and of course worked fine when I updated database.
But I searched for your issue , it seems SQL get confused somehow, the all solutions for problems like you, were saying use [] around tableName or ColumnName, it seems you have another name like these names and SQL can't specify them.
If you just tell me more about your entities before and after changes, I can follow your footstep and get error like you.
Site works fine. Suddenly it will through an error. When clicking "flush system cahce" the error will go away for a some time. Anything from minuttes to severaƦ hours.
Core: Exception handler (WEB): Uncaught TYPO3 Exception: #1247602160:
Unknown column 'tx_my_domain_model_formular.rel_formular' in 'where
clause' |
TYPO3\CMS\Extbase\Persistence\Generic\Storage\Exception\SqlErrorException
thrown in file
/webserver/typo3/src/6.2.15/typo3/sysext/extbase/Classes/Persistence/Generic/Storage/Typo3DbBackend.php
in line 862.
It is correct that the columns does not exist. But how to preceed in finding the error after this? Where is the sql generated that causes the site to crash?
UPDATE
A check "myParentObj->getChildObj instanceof myChildObjClass" used to work just fine. After changing myParent model to lazy load the ChildObj, then the class of childObj changed from childObjClass to a lazyLoadClass... I am not sure but I guess that is in turns somewhere somehow caused the core error seen in the log.
How to investigate further I simply cannot work out. Eg. store all DB calls in a file og DB to analyze after the error occours.
First
Please take time to write a good question. For a good question you'll get a good answer. It doesn't have to be perfect (not everyone is a native english speaker) but please reread your question.
Answer
If all fields are defined correctly, just run a DB compare from within the installtool.
If not, you need to define the DB-fields in your extension correctly.
Is this your own extension? When doing the query that triggers the error you could call execute(true) to generate the actual SQL statement and debug from there.
I'm using MongoMapper with Joint on Padrino, and trying to get the
upload working. However, I keep getting thrown a NoMethodError
"undefined method 'path' for #<Hash:0xa6fbdf0>". It seems like it
can't see the path, but the parameters are okay. What is the problem
here?
Gist with the code: https://gist.github.com/1323998
I was able to get it to not error, but when I go to find the file with mongofiles, I can't find. The same goes for rack/grid-fs. Where is Joint saving to, and is it saving at all?
See my comments above:
Here's my thought on what you need to do, I think you need to modify the params so that params[:background][:file] is the tempfile object, like so:
params[:background][:file] = params[:background][:file][:tempfile]
background = Background.create(params[:background])
I'm not 100% sure on this, but if this doen't work I could setup a quick Padrino app and test.