Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.

It's being thrown as an exception by ULConnection.Synchronize() in a C# SQL Anywhere 12 UltraLite.Net Windows Mobile application.

Does it mean that the MobiLink client can't find the MobiLink server? Nothing is showing up in the MobiLink server -ot file.

Is there any way to get more diagnostic information about this exception?

asked 10 Sep '10, 13:17

Breck%20Carter's gravatar image

Breck Carter
32.5k5417261050
accept rate: 20%

If you are getting the error SQLE_MOBILINK_COMMUNICATIONS_ERROR code, a good step to start diagnosis would be to check the system specific error code, which should be returned with the exception.

(10 Sep '10, 21:36) Tyson Lewis
Comment Text Removed
2

@Tyson: OK, but how? Here on SQLA we REALLY LIKE actual code examples. BTW SQLE_MOBILINK_COMMUNICATIONS_ERROR does not appear anywhere in the Help, nor in a Google Search.

(11 Sep '10, 11:22) Breck Carter

Based on an example from our documentation:


public void Sync()
  {
         try
         {
            _conn.Synchronize( this );
            _inSync = false;
         } 
         catch( ULException uEx ){
            if( uEx.NativeError == ULSQLCode.SQLE_MOBILINK_COMMUNICATIONS_ERROR )
            {
               MessageBox.Show(
                    "StreamErrorCode = " + 
                     _conn.SyncResult.StreamErrorCode.ToString() + 
                     "\r\n"
                  + "StreamErrorContext = " + 
                    _conn.SyncResult.StreamErrorContext + "\r\n"
                  + "StreamErrorID = " + 
                    _conn.SyncResult.StreamErrorID + "\r\n"
                  + "StreamErrorSystem = " + 
                    _conn.SyncResult.StreamErrorSystem + "\r\n"
                  );
            }
            else
            {
               MessageBox.Show(uEx.Message);
            }
         }
         catch(System.Exception ex )
         {
            MessageBox.Show(ex.Message);
         }
  }

Full documentation page: http://dcx.sybase.com/index.html#1200en/uldotnet/error-af-development.html

permanent link

answered 13 Sep '10, 19:32

Josh%20Savill's gravatar image

Josh Savill
510135
accept rate: 27%

edited 13 Sep '10, 19:44

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×14

question asked: 10 Sep '10, 13:17

question was seen: 3,304 times

last updated: 28 Sep '10, 21:14