June 4, 2009 at 10:31 pm
by admin · Filed under javascript
Sometime it happens that we need to make copy of an array but in javascript when we assign an array to new it assign it with reference means if you delete anything from new array it will delete it from the main array as well
To create a copy of an array that is independent of another array:
Use the Array object’s slice() method.
For example, the following statements create an array and then use slice() to make an independent copy of the array.
// JavaScript syntax
var oldArray = ["1", "b", "3"];
var newArray = oldArray.slice();
Permalink
June 2, 2009 at 3:31 pm
by admin · Filed under hsqldb, Database, Troubleshoot, Java
This error appears when you have not specified required privileges to user in SCRIPT file for running the statements. Use the commands as follows just after user creation grant access as DBA like below:
CREATE USER SA PASSWORD ""
GRANT DBA TO SA
Permalink
June 2, 2009 at 2:53 pm
by nitingautam · Filed under hsqldb, Database, Troubleshoot, Java
While running HSQLDB in standalone mode you may face the error
java.sql.SQLException: User not found: SA
This is because while creating the DB using script file you are not creating the user
CREATE USER SA PASSWORD ""
The above command you have to include in your db.script file db is your database name) this will creates a user by name SA with blank password.
Permalink