简体   繁体   中英

Table/View does not exist on Derby + Netbeans Connect

I am trying to make this connection with Derby in Netbeans for products registration. Connection with Database seems okay, but when I try to insert an object in a statement it returns Table/View does not exist error. Already tried to read other cases of the same error in the forum, but looks that my case is different. I tried to verify case sensitive names it's okay, tried to execute an sql command directly from Netbeans, the table appears with its columns. (I'm not using the app in the dist folder, I'm executing from Netbeans)

My insert: 图像1 Here, in the connection no problem, it finds the BD: Imagem2 Executing a command from Netbeans table is okay: Imagem3 Error in GUI: Imagem4

You might be using two different Mercado databases. If you search your hard disk for a folder by the name 'Mercado', I believe you may find two of them:

  1. When you connect with the Netbeans IDE, you are accessing the Derby Network Server, which has a "home" directory somewhere on your hard disk, and it is storing the database using the relative pathname Mercado .
  2. When you run your standalone program, you are using the Embedded Driver, not the Client/Server Driver, so your standalone program is accessing the database using the relative pathname Mercado

Unless you have very carefully ensured that your standalone test program is running with its current working directory pointed at the same location that is being used by the Derby Network Server as its database home directory, then you have probably created two different Mercado databases and that is why your data is found in one of them and not the other.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM