MySQL database - can't create new records or see old

Recently downloaded Trail version to begin looking at migrating from Filemaker to Servoy.

We’d like to use a MySQL database as we have existing solutions (web, etc.) and a good Linux Server with MySQL already in place.

Steps completed:

Installed latest Java (well, next to latest due to being on windows)

Installed Servoy

Create MySQL database via command line on localhost - same box as servoy is installed on.

Set-up MySQL database connection in Servoy - after copying MySQL drivers into Servoy driver folder

Create 3 tables and a few basic fields in db via Servoy - cust, event, event_items, each with a few basic text fields

Create 3 forms - one for each table.

Create relationships linking custid pk (servoy generated) to event_custid field, and event_items_eventid to eventid field.

Go to customer form, insert all fields.

View in Data View (Ready) Mode - cannot add new record, new record button is greyed out.
Cannot add new records on any table.

Added records in database directly, these records do not show in Servoy.

Importing a record via Servoy from tab file, these records show in Servoy, and can be edited yet no New Records can be created - greyed out button.

Servoy set up with user/password for MySQL that has full permissions.

There are no system (file, process, etc) permission issues that I’m aware of.

Anyone have any idea why I’m not able to create a new record via Servoy? Or see existing data in the MySQL database added externally to Servoy?

I’ve seen a few posts about caching issues - which might explain the last question, but not the first. Also, how to disable caching while developing?

I can add/delete/create tables and fields via Servoy with changes shown in the db. I can also import from files into the db from servoy, and then see that data.

Cannot create new records via Servoy - or see records created outside of Servoy that show in the db.

Thank you for any information or direction on where to look. So far, I love the Servoy software…but need to get a demo for management together and see if they want to pursue a migration.

Thank you,

Nolan M.
FSCIweb

Servoy Trial Version - 2.2 downloaded 6/28/2005

Java j2sdk-1_4_2_04-windows-i586-p.exe installed 6/28/2005
(two jar driver files, one designated g, another not, I placed the one w/o the appended g in the file name into the Servoy folder. What is the g designation for?)

MySQL 4.1.9-max installed on local machine

Windows XP SP2

What you don’t say anything about but what you should do is get the latest MySQL java driver from their website. This solved a lot of issues for people.

Another issue you may need to watch out for:

You need to decide whether your mySQL database or Servoy will manage primary key generation. If this is not set up correctly, you will not be able to create records.

Thank you for the replies - any help is appreciated.

I did download the latest stable java MySQL driver (3.1) before setting up this trial solution…also, just tried the latest alpha (3.2), still no luck.

The tables and fields were all created via Servoy…and left the default pk and sequence that servoy autocreates with a new table.

Still cannot create new records via Servoy…the new record button is greyed out…and attempts at entries into fields directly result in a warning in the bottom left corner - No Record, Create one first.

I can still import via Servoy (text file, etc) and see them in the db and servoy, but cannot create them via the db and see them in servoy.

So, I know the connection between Servoy and MySQL is working - to some degree - due to the tables and fields being created correctly. Now just need to figure out how to allow for data entry through Servoy.

Any other ideas? I’m going to try some different config settings for MySQL , and possibly with another version on another platform and connect via a LAN.

What would cause the new record button in Servoy to be disabled? A db driver issue? a config in Servoy that I’m unaware of? Must something be enabled to allow for data entry and new records?

The fields on the forms are set as editable…I didn’t see any other items that might affect this.

I also added a user, as admin, and made sure all forms and fields were accessible, etc. Logged in as this user, no change in behavior - new record still greyed out.

Thank you for any assistance. I love the user interface for Servoy so far…and scripting looks so much more powerful than Filemaker. I’m excited to get into the meat of things if I can get this configured to work.

Nolan M.
FSCIweb

Hi Nolan,

Can you send me the .log.txt inside the Servoy main directory?

Sent.

I don’t know why…but its working now. I did not change any settings, except for adding -DSTACKTRACE=true to the servoy_developer.bat. The .log.txt file did not log anything interesting.

I had two forms created. A basic customer contact info form, and an “event” form. Each form was pulled fields from their own table, with a event_custid linking to the custid via a relationship.

What’s interesting is that I’d always been trying to enter a new customer - and the new record button would not show up. I never even looked at the event form. I glanced at it…and the New Record button was working…I could add records, and they would link via the relationship with records in the cust table that I’d added outside of servoy - even though the servoy cust form would not show any data.

So, deleted the cust form, and rebuilt it. Now it all works…and I have no idea why - unless there was some setting on that form that I was unaware of or had inadvertantly changed.

The only thing I can think it might have been is that while playing with a few things I’d created a method called “Mainpage”. It was empty, and so should not have done anything, right? The event form didn’t show any methods, the cust form I had trouble with did - this empty Main page method. After deleting the form, and rebuilding, I added another empty method to the cust page - it didn’t affect it and the New Record button is still there - data entry works.

So, confused as to why, but glad its working now.

Thanks for the assistance offered. I’ll respond if I run into it again or find a way to recreate the problem.

Thanks,

Nolan M.
FSCI