cancel
Showing results for 
Search instead for 
Did you mean: 

Sybase Anywhere connection String

Former Member
0 Kudos
4,251

Hi There: I have a .Net application that I run on a PDA Handheld. When I try to connect to a System.Data.SqlServerCE, I use this connection string:

Dim connection As New SAConnection
Dim connectionString As String = String.Format("UID={0};PWD={1};DBF={2", userId, password, Caseman_db_file)
connection = New SAConnection(connectionString)
connection.Open()

Everything works fine Except that when connected it opens up a Sybase window that shows: Different status like Running Windows CE, 600 K memeory, Database sevrevr stopped etc. Ques: How can I hide this Sybase window on my PDA when I connect to this iSQL. This DB file is on my PDA. What connection parameter do I need to hide this screen. I would prefer to add another paramter that would hide this screen. I built my code, deploy it on the PDA and then on the PDA I am running my application that connect to the Sybase DB(On my PDA).

Thanks Syed Zaman

Accepted Solutions (0)

Answers (1)

Answers (1)

jeff_albion
Advisor
Advisor
 Dim connectionString As String = String.Format("UID={0};PWD={1};DBF={2}", userId, password, Caseman_db_file)

You will want to add the START connection parameter to point to the server executable and pass the server switch "-qw" (hide the main window, keep the system tray icon) or "-qi" server switch (hide the window and system tray icon).

i.e.

 Dim connectionString As String = String.Format("UID={0};PWD={1};DBF={2};START=\\Program Files\\SQLANY12\\dbsrv12.exe -qi", userId, password, Caseman_db_file)
Former Member
0 Kudos

OMG!Thanks Jeff. It worked. I checked the dbsrv11.exe on my PDA and then added this parameter and worked in 1st shot. I spent 5 whole hours digging-in here and there and finally your response saved me. Braveo! and again thanks a lot. Syed

Former Member
0 Kudos

Ok Jeff. I found it takes some time to connect to the Sybase DB file on my PDA by using the above string. I tried all possible ways: START=Program FilesSQLANY12dbsrv12.exe -qi START=Program FilesSQLANY12dbsrv12.exe -qw START=Program FilesSQLANY12dbsrv12.exe -q -c 3M

But in each case, it takes a noticable time. Why when both dbsrv11.exe and the db file , all remain on the PDA?

jeff_albion
Advisor
Advisor
0 Kudos

I found it takes some time to connect to the Sybase DB file on my PDA by using the above string

How much time, exactly? Now that you have "START" line in-place, can you add after the -qi / -qw switch, a console log output switch to generate a log to record what's happening at start-up?

Dim connectionString As String = String.Format("UID={0};PWD={1};DBF={2};START=\\Program Files\\SQLANY12\\dbsrv12.exe -qi -o \\console.txt", userId, password, Caseman_db_file)

Be careful that the database is not undergoing automatic recovery if the database server was forcibly shut down during its last run.