When I executed my query, I see that Scalardb prints contain ? for values.
[debug] c.s.d.s.c.StatementHandler - query to prepare : [UPDATE codingjedi.users SET tx_committed_at=?,tx_state=? WHERE bucket=? AND email=? AND authprovider=? AND firstname=? AND lastname=? IF tx_id=? AND tx_state=?;].
[debug] c.s.d.s.c.StatementHandler - query to prepare : [UPDATE codingjedi.users SET tx_committed_at=?,tx_state=? WHERE bucket=? AND email=? AND authprovider=? AND firstname=? AND lastname=? IF tx_id=? AND tx_state=?;].
The values seem to have got added correctly. Is there an error somewhere which I am overlooking?
It is just a debug log and showing a prepared statement given from DataStax Java Driver that Scalar DB internally uses.
Errors will be printed out with error log.
Related
Error in findOne() (getPhonById)
Full error in following images:
Error screenshots: https://imgur.com/a/joHuo3Y
Tried deleting table and creating new, tried using find() but same question.
code in screenshots above
expected 1 record from db
Looks fine to me, I've replicated it only difference being that i use mySQL and it works. You can add a line to your typeorm.config.ts file: logging: true,
it will output your query to the console and then you can see what's wrong with it.
I am trying to compare the date modified (field type: Timestamp) with a value that is based off of a month before the current date. I keep getting a syntax error when using the function DateAdd().
I Am Using Libreoffice base 6.2.3.2 (x64) and firebird 3.0 embedded
Using this code, I get a result returning no records but no error
Select *
From "tblPart"
Where "Date Modified" = Current_Timestamp
but anytime I want to use the Dateadd() function, I get an error
Select *
From "tblPart"
Where
"Date Modified"< Dateadd(Month,-1,Current_Timestamp)
Expected to Return a list of results that have been modified over a month ago.
Errors:
SQL Status: HY000
Error code: 1000
Syntax error in SQL statement
SQL Status: HY000
Error code: 1000
SQL Status: HY000
Error code: 1000
syntax error, unexpected $end, expecting BETWEEN or IN or SQL_TOKEN_LIKE
//EDIT: Added the programs that I used
I ran into the same problem. Though the SQL-statement with DateAdd() has been suggested as working, LO Base answered the query with a message box
Syntax error in SQL statement
Why it should work
In contrast the same SQL statement like in the query succeeded by running it in the "Execute SQL Statement" window (LO Base' main window menu "tools" > "SQL…").
Solution
What finally got my query to work was to check "Run SQL command directly" in the toolbar or in the "Edit" menu.
This prevents LO from analyzing the SQL query before execution. This fails, because it is not understanding the full SQL statement (firebird's DateAdd()-function), and thus is the reason for the mentioned errors.
So I have tried to get the error message from a filter array in a logic app workflow, this is what i have tried:
#body('Filter_array')['error']
#actions('Filter_array')['outputs']['body']['error']
Am I missing something or doing something wrong here?
Thanks.
UPDATE:
It says: "cannot be evaluated because property 'error' cannot be selected. ".
But i can clearly see the "error" in the body object in the output.
Ok so i managed to figure it out, i missed the fact that the array doesnt give me a single object as i thought i set it up to. so the solution was this:
#string(actions('Filter_array')['outputs']['body'][0]['error'])
Thanks for the help! :)
Can you try with #actions('Filter_array')['error'] ?
You have to distinguish 2 types of errors.
First error can occur during execution of your connector. Eg. The filter did not match. In this case, the connector executed and returns an output with an error-message.
Second error is a runtime error that can occur on the connector. For example if the input of your connector is invalid and the executing of the connector can't be triggered. In this case, the connector does not generate an output or result. In that case, you have to catch the exception with #actions('Filter_array')['error']
Running a query on titan-rexster-cassandra-0.4.1 :
http://localhost:8182/graphs/graph/tp/gremlin?script=g.V().has('place',WITHIN,Geoshape.circle(38.8951,-77.0367,50)).count()
fails with the following error:
{"message":"","error":"javax.script.ScriptException: com.thinkaurelius.titan.core.TitanException: Could not process individual retrieval call ","api":{"description":"evaluate an ad-hoc Gremlin script for a graph.","parameters":{"rexster.returnKeys":"an array of element property keys to return (default is to return all element properties)","rexster.showTypes":"displays the properties of the elements with their native data type (default is false)","load":"a list of 'stored procedures' to execute prior to the 'script' (if 'script' is not specified then the last script in this argument will return the values","rexster.offset.end":"end index for a paged set of data to be returned","rexster.offset.start":"start index for a paged set of data to be returned","params":"a map of parameters to bind to the script engine","language":"the gremlin language flavor to use (default to groovy)","script":"the Gremlin script to be evaluated"}},"success":false}
Note: I am able to run it without any problems using gremlin console.
Thanks for any help
I program with libpq.so. I want to get the error code which is called sql state in SQL Standard.How should I get this in my c code?
The obvious Google search for libpq get sqlstate finds the libpq-exec documentation. Searching that for SQLSTATE finds PG_DIAG_SQLSTATE in the PQresultErrorField section.
Thus, you can see that you can call PQresultErrorField(thePgResult, PG_DIAG_SQLSTATE) to get the SQLSTATE.
This is just addition I can not leave in form of comment due to reputation reasons.
Note that you can not portably get SQLSTATE for errors that can occur during PQconnectdb. In theory, you can read pg_conn (internal struct) field last_sqlstate which contains correct value.
For example, if you try to connect with invalid login/password, it will give you 28P01. For wrong database it will contain 3D000.
I wish they defined publically available getter for this field.
You can check this one as well:
libpq: How to get the error code after a failed PGconn connection