javadb

Derby: CONCAT equivalent

余生颓废 提交于 2019-12-22 02:16:20
问题 Good day! What is the equivalent function of Derby/Java DB to the CONCAT function of MySQL? I tried using CONCAT to Derby but it commits an error. 回答1: I believe you can concatenate two string with || Derby Built-in function reference - concatenation 来源: https://stackoverflow.com/questions/10203863/derby-concat-equivalent

Programmatically setting derby.system.home

不打扰是莪最后的温柔 提交于 2019-12-20 14:21:05
问题 Need to move the database and log files of JavaDB (derby) db files into deployment directories. The database is working in the application startup directory as JavaDB creates a folder with the name of the database (in my case mydb), but I want to move that dir into a subdir called data/ creating data/mydb. I can do this with the connect call: DriverManager.getConnection("jdbc:derby:data/mydb;create=false"); and this works. But I'd like to programmatically explicitly set the value of derby

Class [org.apache.derby.jdbc.ClientDriver] not found. When trying to connect to db

喜你入骨 提交于 2019-12-17 19:36:33
问题 I have set up a project in Netbeans, created a script, made a new database with javadb. I can connect to it by gui - display the tables contents etc, but when i run an application with: EntityManager em = Persistence.createEntityManagerFactory("lab5PU").createEntityManager(); i get this quite long exception: [EL Info]: 2013-04-05 21:40:45.554--ServerSession(1198260109)--EclipseLink, version: Eclipse Persistence Services - 2.3.0.v20110604-r9504 [EL Severe]: 2013-04-05 21:40:45.574-

Creating a foreign key in Java db (Netbeans)

[亡魂溺海] 提交于 2019-12-14 01:42:32
问题 I've been having problems creating a foreign key in Java Db through Netbeans. I'm pretty sure I have to use an SQL command to change an attribute in the PLAYERS table into a foreign key as I can only specify primary keys through the interface. I have tried executing this command: ALTER TABLE PLAYERS ADD CONSTRAINT TEAMNUM_FK Foreign Key (TEAMNUM) REFERENCES TEAM (TEAMNUM); It's supposed to add/alter TEAMNUM in the PLAYERS table to a foreign key related to a primary key in TEAM table so that

How to deploy a Java Swing application with an embedded JavaDB database?

删除回忆录丶 提交于 2019-12-13 14:10:40
问题 I have implemented an Java Swing application that uses an embedded JavaDB database. The database need to be stored somewhere and the database tables need to be created at the first run. What is the preferred way to do these procedures? Should I always create the database in the local directory, and first check if the database file exist, and if it doesn't exist let the user create the tables (or at least show a message that the tables will be created). Or should I let the user choose a path?

In derby should I be using the APP schema or the MYDBNAME schema

冷暖自知 提交于 2019-12-13 07:14:56
问题 Every time I create a derby database there are several schemas including the APP schema and a schema with the same name of the USERNAME. Which schema should i be using, the APP or the USERNAME schema? Why is the APP schema introduced if the USERNAME schema is set as the default schema. Hopefully this is a quick question for a derby pro. :) 回答1: You can use any schema you want. If you don't explicitly specify a schema, Derby picks a default schema for you. http://db.apache.org/derby/docs/10.8

Week of year of a timestamp using derby/JavaDB

僤鯓⒐⒋嵵緔 提交于 2019-12-13 05:46:41
问题 I need to know the week of year of a timestamp using Derby/JavaDB. And to make it worse I have to extract it from a parameter not a column. Don't ask why but that should be a minor problem. On DB2 I say someting like VALUES WEEK_ISO(?) But how do I get the same result with Derby aka JavaDB? 回答1: Thanks Bryan, your Link was very helpful. http://therealdanvega.com/blog/2010/02/17/creating-apache-derby-custom-functions-part-2 It seems there is no week function in derby but it is very easy to

Issues deploying a Java application to Tomcat

只愿长相守 提交于 2019-12-13 04:19:04
问题 I built a simple Java web application. It provides a series of RESTful APIs for the user to carry out certain operations on a Java DB through a web interface. I used NetBeans environment during the development, and Glassfish for testing. Now that I finished it, I would like to be able to deploy it on another machine using binaries (although as for now I use the same machine until I learn how to do it). I installed Tomcat 7, and moved the .war file into Tomcat's webapp folder. The application

Getting a java.sql.SqlNonTransientConnectionException

我是研究僧i 提交于 2019-12-13 00:46:54
问题 I am rather new to Java and JavaDB. I am trying to create a database in Netbeans 7.0.1 and after the server starts, I get an error that says: "An error occurred while creating the database: java.sql.SqlNonTransientConnectionException: A communications error has been detected: Software caused connection abort: recv failed.." I have tried to disable my antivirus (Microsoft Security Essentials) and my Windows Firewall, as well as disable an internet filter(Contentwatch's NetNanny) all to no

Start service not active in netbeans

▼魔方 西西 提交于 2019-12-12 04:31:24
问题 I'm new to Java and net beans. I started to create database but when I right click Java DB in service. I found create database and start service not active . Is there anything should I do ? and Should I start service before create database ? 来源: https://stackoverflow.com/questions/42829129/start-service-not-active-in-netbeans