I try to integrate already implemented SAPUI5 application with CAP in order to use SQLite database. In my models I have a property called Order and as you may know, Order is a reserved keyword in SQLite.
entity MyEntity{
key ID : Integer;
Name: localized String(111);
Order: Integer;
}
When I try to use the following command to generate the database:
cds deploy --to sqlite:db/mydb.db
I get the syntax error:
[ERROR] SQLITE_ERROR: near "Order": syntax error
When I use the quotation in my defined entity, then I get an error which regards to SAP HANA database:
[ERROR] cds compile failed due to these errors...
at db\schema.cds:23:3-10: Quoted identifiers are not allowed in plain mode of toHana: "Order"
I just wanted to know is there anyway to solve the issue?
PS: I do not want to use HANA database, so please let me know if there is anyway to disable it, because I could not find any information in this regards.
I appreciate any help or advice :)
In the package.json of your application's root folder, you might have mentioned HANA as the productive DB 'kind'. Try changing it to SQLite.
Related
I am using the MATLAB Database toolbox to read data from MS Access *.mdb files. In the past I did this using the jdbc:odbc bridge 'sun.jdbc.odbc.JdbcOdbcDriver.' However, this driver is no longer supported or available, and I am implementing a solution using the UCanAccess driver. This is based on the solution described in the MATLAB Answers forum here. However, I am encountering a driver error and am hoping someone can help offer some suggestions!
Here is the MATLAB documentation on the database() function.
I've downloaded and installed UCanAccess 5.0.0.
Below is my MATLAB code:
javaaddpath('C:\Program Files\MATLAB\UCanAccess\UCanAccess-5.0.0-bin\ucanaccess-5.0.0.jar');
javaaddpath('C:\Program Files\MATLAB\UCanAccess\UCanAccess-5.0.0-bin\lib\commons-lang3-3.8.1.jar');
javaaddpath('C:\Program Files\MATLAB\UCanAccess\UCanAccess-5.0.0-bin\lib\commons-logging-1.2.jar');
javaaddpath('C:\Program Files\MATLAB\UCanAccess\UCanAccess-5.0.0-bin\lib\hsqldb-2.5.0.jar');
javaaddpath('C:\Program Files\MATLAB\UCanAccess\UCanAccess-5.0.0-bin\lib\jackcess-3.0.1.jar');
javaaddpath('C:\Program Files\MATLAB\UCanAccess\UCanAccess-5.0.0-bin\loader\ucanload.jar');
db_path = 'C:/Data/file.mdb';
url = ['jdbc:ucanaccess://' db_path];
conn = database('','','','net.ucanaccess.jdbc.UcanaccessDriver',url);
The connection object is created in MATLAB, but a Warning pops up:
WARNING:You shouldn't use 'user' reserved word as column name in the table BatchHistory_Table (it refers to the database user).
Escape it in your SQL!
(e.g. SELECT [USER] FROM TABLE WHERE [USER]='Joe')
Does this imply something is incorrect or corrupt with my mdb file itself? The mdb files are created by a 3rd party software package, and I can't alter any of the data, column names, or table names. I just want to read the data from the mdb file.
Then when I look at the connection Message, conn.Message, this is:
'JDBC Driver Error: UCAExc:::5.0.0-SNAPSHOT unexpected token: AND required: VALUE'
I don't know what steps to take next or how to find more information on this Driver Error. Does this have to do with an expected query? I haven't tried querying yet - I first want to open the connection and then make my queries on the mdb file.
Thank you in advance for your help!
I'm facing this annoying problem in Jasper. I have created a report based on a PostgreSQL function. When I watch the preview, I do not have any problem with the results. However, when I publish the report and try to execute it, I get this error:
org.postgresql.util.PSQLException: ERROR: cannot execute CREATE TABLE in a read-only transaction
I've checked on the internet for a possible solution, so far this is the only thing that I have found with a similar problem:
https://community.jaspersoft.com/questions/814793/report-execution-fails-due-read-only-transaction-mode
However, adding the property to the URL does not work, or I'm not so sure if I have to write it in this way:
jdbc:postgresql://server:5432/data_base?defaultReadOnly="false"
In Jasper, what else can I do? I only can query the function, and requiring any change in it is an HUGE bureaucratic issue.
Jasper Studio 6.3.0
According to the documentation the JDBC connection parameter would be readOnly=false.
Have you verified that you are not connecting to a streaming replication standby server?
In my app I'm using torann/currency to fetch Yahoo Finance exchange rates. When using their official documentation adding and updating currencies works perfectly in Local development ENV, for which MySQL is used.
App is deployed to Heroku, and there DB environment is PostgreSQL. So when I try to use php artisan currency:manage add USD , I get the following error: invalid input syntax for integer
DB Schema for that table is:
Schema::create($this->table_name, function ($table) {
$table->increments('id')->unsigned();
$table->string('name');
$table->string('code', 10)->index();
$table->string('symbol', 25);
$table->string('format', 50);
$table->string('exchange_rate');
$table->boolean('active')->default(false);
$table->timestamps();
});
I tried everything that I could think of; tried to change all types in schema, tried to change blueprints etc. But either I get some different type of error, or I'm back where I started. Guessing that my lack of postgres knowledge is the main issue, and eventually I'll learn it, though I am hoping someone will know the answer to my q.
This is a bug in the package's Database driver that assumes non-strict SQL behavior.
It seems it is only possible to create document-type databases via the HTTP-api. The documentation omit's information about whether the database will be created as a graph or a documentdatabase, but when creating a vertext, i get the error:
Super-class V not exists
...which, as i understand, means that the database is a document-type.
Is there any way around this? The /command/ action makes it pretty easy for me to do what I want from C#, if I could only generate a graph-database via HTTP-api...
Is there any way to create a graph-database through the HTTP-API?
Alternatively: Is there another way to create a graph-database from c#? I've tried creating a database via the console, but here i get IllegalArgumentException:
Error: java.lang.IllegalArgumentException: Storage type 'plocal' is different by storage type in URL
..which i cannot find any explenation for
Any help is much appreciated :)
I managed to have that using POST http://localhost:2480/database/<db name>/plocal/graph
I did found it experimentally. Did not found that in documentation which is a bit strange.
Tested on version 2.1.7
I got the same error message when I typed in the following command:
create database REMOTE:localhost/petshop root aaaa plocal document
Solution:
I had to write it in lower case:
create database remote:localhost/petshop root aaaa plocal document
I am New To ODI 11g, i have to transport data from one Database(Oracle) to another Database(Oracle), for this the table in source was already imported in the source model, i am trying to setup Target database's meta data in ODI 11g and i have done all the steps right when i try to reverse engineer this new model which i created nothing happens. I am stuck with this problem at work since there is no error so i cannot think of any reason why meta data is not being imported
I would like to clarify this, the target table which i am trying to import is accessed from ODI with the super user
Any help would be appreciated.
Could you check that the schema used to connect to the Dataserver where the target table is located actually got the privileges to access the target table?
If not, grant select and insert (and maybe update, delete depending on the IKM you use) on that table.
I faced the same issue and resolved it by providing read access to the schema ODI is using to reverse engineer.
As I was using standalone installation, ODI studio log had the below information:
[2015-01-17T19:10:21.979+05:30] [] [NOTIFICATION] [] [] [tid: 2374]
[ecid: 0000Kfs7s20Fg4WFLzvH8A1KiWkx00000d,0] New data source:
[HR/*******#jdbc:oracle:thin:#//localhost:1521/pdb1]
HR schema was the first schema I reverse engineered, and it was being used as default user to read other schemas.
Try checking the agent logs to see what user is being used and provide it the privileges on all other schema's.
Althoug I dont know how to tell ODI to use a particular user to access database while reverse engineering. It would be great if some one gives some insight on it.
Probably on masking of reverse engineering you are missing character: %