Home > Archive > SQL Anywhere Mobile > May 2005 > -956 Error









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author -956 Error
Dave Mawer

2005-05-10, 8:24 pm

I'm using the Ultralite component on a Palm App. I'm getting a -956 when I
try and synchronise, which suggests a ULInitSynchInfo problem - I don't
understand - can anyone help?


DECLARATIONS
==============

ul_char* mem_pc_OpenParms;
Connection* mem_puc_connection;
DatabaseManager *mem_puc_dbManager;
Table* mem_puc_table;

SOURCE
========

static char szStream_parms[40];

if ( mem_puc_connection)
{
mem_puc_connection->InitSynchInfo( &mem_us_synch_info );
}

ULInitSynchInfo ( &mem_us_synch_info );
GetUserInformation ();

//synch_info.stream = ULSocketStream();
mem_us_synch_info.stream = ULHTTPStream();


Int16 i_len = mem_str_Server.GetLength ();
StrPrintF (szStream_parms, "host=%s;port=2440", mem_str_Server.GetBuffer
(i_len));
mem_us_synch_info.stream_parms = UL_TEXT (szStream_parms);

// for ping requests uncomment the following line!
//synch_info.ping = ul_true;

// set the callback function
mem_us_synch_info.observer = ObserverFunc;

//save state and synchronise
if ( mem_puc_connection )
{
mem_puc_connection->SetSynchInfo ( & mem_us_synch_info );
mem_puc_connection->Synchronize( &mem_us_synch_info );
an_sql_code i_index = Sqlca.GetSQLCode ();


mem_b_previousSynch = true;
}



PrgStopDialog(gSynch
Progress, true);
gSynchProgress = NULL;

Disconnect ();



Shuchit

2005-05-10, 8:24 pm

"Dave Mawer" <dave@lucy.pageinabox.com> wrote in news:42811732@forums
-1-dub:

> I'm using the Ultralite component on a Palm App. I'm getting a -956 when I
> try and synchronise, which suggests a ULInitSynchInfo problem - I don't
> understand - can anyone help?
>
>


What version are you using and what build number ?

>
> static char szStream_parms[40];
>
> if ( mem_puc_connection)
> {
> mem_puc_connection->InitSynchInfo( &mem_us_synch_info );
> }
>
> ULInitSynchInfo ( &mem_us_synch_info );



I do not think the call to ULInitSyncInfo is necessary. That is a function
from the embedded SQL interface. You seem to be using C++ component api
interface. The call to InitSyncInfo already initialized the structure so you
should be okay with just removing the call to ULInitSynchInfo

Shuchit
Dave Mawer

2005-05-11, 1:24 pm

I'm using ASA 9.0.1 1899.

I've removed the ULInitSynchInfo command.

I still get the -956 Error.

I noticed in the documentation that it refers to a init_verify method - can
you explain this?

Many thanks


"Shuchit" <me@privacy.net> wrote in message
news:Xns9652CD599A2D
2svelkarprivacynet@1
27.0.0.1...
> "Dave Mawer" <dave@lucy.pageinabox.com> wrote in
> news:42811732@forums
-1-dub:
>
>
> What version are you using and what build number ?
>
>
>
> I do not think the call to ULInitSyncInfo is necessary. That is a function
> from the embedded SQL interface. You seem to be using C++ component api
> interface. The call to InitSyncInfo already initialized the structure so
> you
> should be okay with just removing the call to ULInitSynchInfo
>
> Shuchit



Shuchit

2005-05-13, 8:24 pm

"Dave Mawer" <dave@lucy.pageinabox.com> wrote in news:42823b81@forums
-2-
dub:

DM> I'm using ASA 9.0.1 1899.
DM>
DM> I've removed the ULInitSynchInfo command.
DM>
DM> I still get the -956 Error.



DM> DECLARATIONS
DM> ==============
DM>
DM> ul_char* mem_pc_OpenParms;
DM> Connection* mem_puc_connection;
DM> DatabaseManager *mem_puc_dbManager;
DM> Table* mem_puc_table;
DM>
DM> SOURCE
DM> ========
DM>
DM> static char szStream_parms[40];
DM>
DM> if ( mem_puc_connection)
DM> {
DM> mem_puc_connection->InitSynchInfo( &mem_us_synch_info );
DM> }
DM>
DM> GetUserInformation ();
DM>
DM> //synch_info.stream = ULSocketStream();
DM> mem_us_synch_info.stream = ULHTTPStream();
DM>
DM>
DM> Int16 i_len = mem_str_Server.GetLength ();
DM> StrPrintF (szStream_parms, "host=%s;port=2440",
mem_str_Server.GetBuffer
DM> (i_len));
DM> mem_us_synch_info.stream_parms = UL_TEXT (szStream_parms);
DM>
DM> // for ping requests uncomment the following line!
DM> //synch_info.ping = ul_true;
DM>
DM> // set the callback function
DM> mem_us_synch_info.observer = ObserverFunc;
DM>
DM> //save state and synchronise
DM> if ( mem_puc_connection )
DM> {
DM> mem_puc_connection->SetSynchInfo ( & mem_us_synch_info );
DM> mem_puc_connection->Synchronize( &mem_us_synch_info );
DM> an_sql_code i_index = Sqlca.GetSQLCode ();
DM>
DM>
DM> mem_b_previousSynch = true;
DM> }
DM>
DM>
DM>
DM> PrgStopDialog(gSynch
Progress, true);
DM> gSynchProgress = NULL;
DM>
DM> Disconnect ();




You don't seem to be setting the mobilink username anywhere, which would
give this error. This would be the user_name field on the ul_synch_info
structure. You should also probably specify the MobiLink script version.
Also, I would start simple and comment out the observer function until
you get basic connectivity working.

You might also want to post this to the UltraLite newsgroup, which is
where the UltraLite experts hangout.

Shuchit

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com