Trouble connecting to new ASA db

I’m on windows XP. I want to create a new db in ASA iAnywhere for use with Servoy. I downloaded and installed the ASA Studio 9 from the iAnywhere website. I can connect from Sybase Central to the pre-existing ASA dbs in the Servoy/databases folder (e.g. crm.db, example.db, etc.). When I create a new db in Sybase Central, it creates it successfully but when I try to connect to it, I get the following error:

[Sybase][ODBC Driver][Adaptive Server Anywhere]Request to start/stop database denied

Error code=-75

SQL state=42000

Connection parameters:

User=DBA

Password=***

DBF=C:\Program Files\Servoy\database\tbs.db


I just got off the phone with iAnywhere tech support and they thought this was due to a conflict between the ASA Studio 9 installation and the Servoy installation.

Anyone run into this?

%%servoy_install_directory%%\sybase_db

Edit the sybase.config with a text editor and add your new database name.

Exit Servoy and stop the sybase process, then restart Servoy.

After talking to Bob Cusick I was directed to the workaround which is in the FAQ list on this forum - i.e. I replaced the dll and exe files in my sybase_db folder with the same files from the Sybase/win32 folder.

This solved one problem but created another - I can now connect to my new db from Sybase Central, but I can’t open Servoy - it complains that it can’t connect to the repository server.

I am next going to try downgrading to SQL Anywhere 9.0.1.

You should ALWAYS check the “sybase_log.txt” file inside the “sybase_db” folder inside your Servoy install directory. It will tell you exactly why the database couldn’t be started.

Bob,

I seem to have solved my problem, and for the benefit of others I will try to recap how I did it.

First, I followed the various recommendations in this forum:

  • I downloaded and installed Sybase 9.0.1, full install
  • I did a fresh install of Servoy 2.2.3
  • I replaced the dll and exe files in Servoy/Sybase_db with the same files from Sybase/SQL Anywhere/win32
  • Restarted my computer
  • launched Servoy

At that point I got “can’t connect to the repository server specified in the application preferences” with details “java.sql.SQLException: JZ006: Caught IOException: java.net.ConnectException: Connection refused: connect”

The sybase log ends with the following:

I. 12/20 14:02:13. Note: Database file “C:\Program Files\Servoy\database\servoy_repository.db” consists of 43 disk fragments
I. 12/20 14:02:13. Note: Database file “C:\Program Files\Servoy\database\log_data.db” consists of 27 disk fragments
I. 12/20 14:02:14. Note: Database file “C:\Program Files\Servoy\database\crm.db” consists of 33 disk fragments
I. 12/20 14:02:14. Note: Database file “C:\Program Files\Servoy\database\user_data.db” consists of 24 disk fragments
I. 12/20 14:02:14. Note: Database file “C:\Program Files\Servoy\database\example.db” consists of 33 disk fragments
I. 12/20 14:02:34. Database server started at Tue Dec 20 2005 14:02
I. 12/20 14:02:34. Trying to start SharedMemory link …
I. 12/20 14:02:34. SharedMemory link started successfully
I. 12/20 14:02:34. Trying to start TCPIP link …
I. 12/20 14:02:35. Starting on port 2638
I. 12/20 14:03:01. TCPIP link started successfully
I. 12/20 14:03:04. Now accepting requests

Note: I’ve seen you and Jan repeatedly insist on the forum that the sybase log will always tell you what’s going on but it simply isn’t the case, as the above scenario confirms.

At this point I just started trying things - I’m afraid I can’t say exactly what I did that made it work but here are some things I did:

  • I opened Sybase Central and connected to a couple of the databases in the servoy/database folder, including the servoy_repository.db database. This may have forced the servoy_repository databases to “start”

I believe it was from this point on I was able to start Servoy successfully.

My next goal was to create a new db for a new Servoy solution.

  • I created a new database in Sybase Central and connected to it from Sybase Central. When I did this, I was careful to create the database in the existing server called “servoy_repository” rather than choosing the “Create a database on this computer” option which creates a new server automatically. . If you create a new database while you are connected to one of the servoy dbs, then the “repository_server” shows up in the list of servers you can select as the target server for your new database. THE SERVOY DOCUMENTATION CHAPTER ON CREATING A NEW DATABASE TELLS YOU TO SELECT “CREATE A DATABASE ON THIS COMPUTER” - THAT WAS MISLEADING

  • With the database created and connected to from Sybase Central, I was then able to connect to it from Servoy by creating a new entry in the DB Servers tab of the Servoy Preferences. That is not the end of the story though…

  • The next time I tried to connect to my new db from Servoy after shutting everything down, it couldn’t connect. I had to go in to Sybase Central and at least “start” the database manually (I didn’t have to connect to it, just start it.) Somehow, all the other dbs in the Servoy database folder started automatically, but this new one didn’t the first time. Once I created a solution that used this new db as its “server” then Servoy was able to connect to it without my having to “start” it manually in Sybase Central. Or at least, it appears that’s what has happened. It’s hard to be sure.

Needless to say, Servoy needs to make it a top priority to get these installation issues either fixed or at least properly documented else it’s going to hurt them bad. No one who is trying to learn a new tool should have to go through all this trial and error just to start their first new project.

Don’t know what you are doing, but if you download Servoy2.2.3 you don’t have to manually copy files from your Sybase 9.01 to your Servoy folder (only if you use 9.0.2)

ANd yes, if you create a new database, you have to add it as an server entry inside Servoy and you have to add the database in the sybase.config file (in folder: sybase)

This takes care of starting the Sybase DB the next time you start Servoy.
It is all standard procedure, and all well explained in the manuals!

So I don’t get it, why you have so much troubles…

But hope this helps.. :)

HJK:
Don’t know what you are doing, but if you download Servoy2.2.3 you don’t have to manually copy files from your Sybase 9.01 to your Servoy folder (only if you use 9.0.2)

Thanks for pointing that out - that’s good to know. It would help if in the FAQ section of this forum in the entry called “Database cannot be started, capability 32 missing” made this a little clearer. It tells you to download ASA 9.0.1 “for compatibility” but when I downloaded ASA 9.0.1 and Servoy 2.2.3 I was still having problems and I noticed that the version numbers of some of those SQL Anywhere/win32 files were slightly different (9.0.1.1751 under ASA, and 9.0.1.1899 under Servoy I believe) and this gave me the impression that I still had to move files over for compatibility.

HJK:
ANd yes, if you create a new database, you have to add it as an server entry inside Servoy and you have to add the database in the sybase.config file (in folder: sybase)

This takes care of starting the Sybase DB the next time you start Servoy.
It is all standard procedure, and all well explained in the manuals!

So I don’t get it, why you have so much troubles…

But hope this helps.. :)

Thank you again. You are right - I was skipping that step which is in the manual (and I even forgot that Bob Cusick told me over the phone that I had to do that). Mea culpa. BUT…

I still note that on page 442 of the Developer User’s Guide it tells me to use the "“Create a new database on this computer” option, which, if your servoy_repository server happens not to be running at the time, creates your new db in a new datase server with the same name as the new db. When that happens, Servoy can’t find the new db even if it’s added to the sybase.config file. I believe this is what happened to me, and I feel the docs could have been clearer about that.

I appreciate your help. I’m new to Servoy and it’s nice to see how helpful people on this forum are. I hope to return the favor before too long!