Skip to Content
Author's profile photo Former Member

WM 6.5 Connection to SQL Anywhere DB server

Hello,

I have some trouble concerning the following mini-example ( see attached txt-file ). I’m trying to establish a connection from my mobile device ( Windows Mobile 6.5 ) to a SQL server. The connectionstring works fine on my Notebook.

My mobile device returns a SAException “Database server not found”

Is there anything I should know about the connectionstring with regard to the mobile device OS?

Thanks for any help!

Best Regards

Timo

Assigned Tags

      5 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Mirco Simoni
      Mirco Simoni

      http://dcx.sap.com/index.html#sqla170/en/html/3bd460b56c5f10148922c11d39abc0b3.html

      http://dcx.sap.com/index.html#sqla170/en/html/81b8fc5d6ce21014b869ce9a77d9c7df.html

      You might want to look into Mobilink if you need to synchronize data between SQL Anywhere database on Windows Mobile and a consolidated database (including SAP SQL Anywhere).

      Otherwise, you could use Web Services and the SQL Anywhere HTTP built-in web server.

      Author's profile photo Former Member
      Former Member
      Blog Post Author

      Hello Mirco,

      thanks for your response. I not sure, if we talk about the same thing.

      There is a Windows Mobile device that has to receive some Data from a known Server.  On that server runs the SQL Anywhere DB.

      The question is: If you have to develop an application for the WM device, how would the connection to the SQL Anywhere server look like?

      If I use  my notebook as the receiving client, I define a SAConnection with the following Connectionstring:  "Host=123.123.123.123;Server=Text;dbn=dbTest;uid=dba;pwd=sql"

      ... and it works well.

      Is there a similar command for a Wm 6.5 smart device application?

      Thanks for any help!

      Best regards

      Timo

      Author's profile photo Mirco Simoni
      Mirco Simoni

      http://dcx.sap.com/index.html#sqla170/en/html/826b0c206ce21014909bbea79c53190c.html

      Hi Timo,

      You can access data that are stored on the remote server in two ways: online or offline.

      If online, you can use web services and retrieve data, for example, using a web browser running on Window Mobile and leveraging the SQL Anywhere HTTP web server.

      If offline, you can have another SQL Anywhere database on windows mobile and use Mobilink to synchronize data. Then you could develop an user interface, for example using .NET, to access your data on Windows Mobile. Another option would be to use UltraLite database and Mobilink on Windows Mobile (link above).

      If you install SQL Anywhere 16 or 12, you can find sample applications for Windows CE  in Documents\SQL Anywhere 16\ Samples\SQL Anywhere\CE

      You could connect to the database on Windows Mobile, using a data source file, or a connection string similar to what you have specified in your post. But the database server and database file would be on your Windows Mobile device.

      Author's profile photo Chris Keating
      Chris Keating

      Assuming that the mobile device is able to access the IP pf the server hosting the SQL Anywhere network server engine (dbsrvX.exe where X is the major version of SQL Anywhere), you should be able to connect. How are you verifying that the WM6.5 can access the IP cited in the connection string? Does this connection code work from a different desktop or laptop environment - this will ensure that the database server  is accessible from a remote location?

      You can add LOG=<filespec> to the connection string on the devince and -z -o <filespec> on the database server start line to help troubleshoot this issue further.

      Author's profile photo Former Member
      Former Member
      Blog Post Author

      Thanks for all response. I found out that there is a service which has to run to establish the connection.

      After startig the service "C:\Program Files\SQL Anywhere 16\bin32\dbsrv16.exe" and filled the start options the connection between mobile device and server works instantly.

      Thanks for your help Mirco & Chris

      Best regards and bye bye

      Timo