Home > Archive > SQL Anywhere ultralite > January 2006 > Treo700 GetSQLCode returns -1002









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 Treo700 GetSQLCode returns -1002
John Yovas

2006-01-10, 8:23 pm

ASA version 9.0.2.3137 C++ API

Trying to upgrade a old ultralite application to 9.0.2.3137
Created the reference db with this version generated the files .When I try
to sync GetSQLCode returns -1002
what is -1002 ????

Thanks,
-John


David Fishburn

2006-01-11, 9:23 am

"John Yovas" < johnca2000usNOSPAM@y
ahoo.com> wrote in
news:43c456f8$1@foru
ms-2-dub of sybase.public.sqlanywhere.ultralite:

JY> ASA version 9.0.2.3137 C++ API
JY>
JY> Trying to upgrade a old ultralite application to 9.0.2.3137
JY> Created the reference db with this version generated the files .When I
JY> try to sync GetSQLCode returns -1002
JY> what is -1002 ????

From the 902 Help file:
ASA Error Messages
Database Error Messages
Error messages indexed by Adaptive Server Anywhere SQLCODE
....
–1002 The option '%1' is not recognized.

Looks like a spelling mistake or an old option or something along those
lines. It at least points us to looking at the sync parms you are
providing.
--
David Fishburn
Certified ASA Developer Version 8
iAnywhere Solutions - Sybase
Professional Services
Please only post to the newsgroup
Please ALWAYS include version and MORE importantly BUILD number with
EACH post (dbeng9 -v).

EBFs and Maintenance Releases
http://downloads.sybase.com/swx/sdmain.stm

Developer Community / Whitepapers
http://www.ianywhere.com/developer

CaseXpress - to report bugs
http://casexpress.sybase.com

CodeXchange - Free samples
[url]http://ianywhere.codexchange.sybase.com/servlets/ ProjectDocumentList[
/url]

John Yovas

2006-01-12, 3:24 am

Dave,

That helped ...


9.0.2 does'nt like the "stream=tcpip" in the synch_info.stream_parms just
host=%s;port=%s" works....

Thanks,
-John

"David Fishburn" <fishburn_spam@off.ianywhere.com> wrote in message
news:Xns974857A174BA
8fishburnsybasecom@1
27.0.0.1...[color=darkred]
> "John Yovas" < johnca2000usNOSPAM@y
ahoo.com> wrote in
> news:43c456f8$1@foru
ms-2-dub of sybase.public.sqlanywhere.ultralite:
>
> JY> ASA version 9.0.2.3137 C++ API
> JY>
> JY> Trying to upgrade a old ultralite application to 9.0.2.3137
> JY> Created the reference db with this version generated the files .When I
> JY> try to sync GetSQLCode returns -1002
> JY> what is -1002 ????
>
> From the 902 Help file:
> ASA Error Messages
> Database Error Messages
> Error messages indexed by Adaptive Server Anywhere SQLCODE
> ...
> -1002 The option '%1' is not recognized.
>
> Looks like a spelling mistake or an old option or something along those
> lines. It at least points us to looking at the sync parms you are
> providing.
> --
> David Fishburn
> Certified ASA Developer Version 8
> iAnywhere Solutions - Sybase
> Professional Services
> Please only post to the newsgroup
> Please ALWAYS include version and MORE importantly BUILD number with
> EACH post (dbeng9 -v).
>
> EBFs and Maintenance Releases
> http://downloads.sybase.com/swx/sdmain.stm
>
> Developer Community / Whitepapers
> http://www.ianywhere.com/developer
>
> CaseXpress - to report bugs
> http://casexpress.sybase.com
>
> CodeXchange - Free samples
> [url]http://ianywhere.codexchange.sybase.com/servlets/ ProjectDocumentList[
/url]
>



David Fishburn

2006-01-12, 9:23 am

"John Yovas" < johnca2000usNOSPAM@y
ahoo.com> wrote in
news:43c5c16b$1@foru
ms-1-dub of sybase.public.sqlanywhere.ultralite:

JY>>>csStreamParms.Format(_T(" stream=tcpip;host=%s
;port=%s"),
JY>>>csHostIP,csPort);
JY>
JY> 9.0.2 does'nt like the "stream=tcpip" in the synch_info.stream_parms
JY> just host=%s;port=%s" works....

Can you show the entire code you use for syncing.
--
David Fishburn
Certified ASA Developer Version 8
iAnywhere Solutions - Sybase
Professional Services
Please only post to the newsgroup
Please ALWAYS include version and MORE importantly BUILD number with
EACH post (dbeng9 -v).

EBFs and Maintenance Releases
http://downloads.sybase.com/swx/sdmain.stm

Developer Community / Whitepapers
http://www.ianywhere.com/developer

CaseXpress - to report bugs
http://casexpress.sybase.com

CodeXchange - Free samples
[url]http://ianywhere.codexchange.sybase.com/servlets/ ProjectDocumentList[
/url]

John Yovas

2006-01-12, 1:23 pm

Here it is....
if( csSyncType == TCPIP)
{
#ifdef _ASA902
csStreamParms.Format(_T("host=%s;port=%s"), csHostIP,csPort);
#else
csStreamParms.Format(_T(" stream=tcpip;host=%s
;port=%s"),
csHostIP,csPort);
#endif
}


csMsg. Format(IDS_SYNC_MSG1
);
if ( AfxMessageBox ( csMsg,MB_OKCANCEL ) == IDCANCEL )
return FALSE;

auto ul_synch_info synch_info;
theApp.GetConnection()->InitSynchInfo( &synch_info );

synch_info.user_name = csUserName. GetBuffer(csUserName
.GetLength());
synch_info.password = csPassword. GetBuffer(csPassword
.GetLength());
synch_info.version = UL_TEXT( "MOBILE43" );
synch_info.observer = ObserverFunc;
synch_info.stream_parms =
csStreamParms. GetBuffer(csStreamPa
rms.GetLength());

if( csSyncType == TCPIP)
synch_info.stream = ULSocketStream();
else
synch_info.stream = ULHTTPStream();


if ( theApp.GetConnection()->Synchronize(&synch_info))
& #123;[color=darkred]


"David Fishburn" <fishburn_spam@off.ianywhere.com> wrote in message
news:Xns97495602A771
5fishburnsybasecom@1
27.0.0.1...[color=darkred]
> "John Yovas" < johnca2000usNOSPAM@y
ahoo.com> wrote in
> news:43c5c16b$1@foru
ms-1-dub of sybase.public.sqlanywhere.ultralite:
>
> JY>>>csStreamParms.Format(_T(" stream=tcpip;host=%s
;port=%s"),
> JY>>>csHostIP,csPort);
> JY>
> JY> 9.0.2 does'nt like the "stream=tcpip" in the synch_info.stream_parms
> JY> just host=%s;port=%s" works....
>
> Can you show the entire code you use for syncing.
> --
> David Fishburn
> Certified ASA Developer Version 8
> iAnywhere Solutions - Sybase
> Professional Services
> Please only post to the newsgroup
> Please ALWAYS include version and MORE importantly BUILD number with
> EACH post (dbeng9 -v).
>
> EBFs and Maintenance Releases
> http://downloads.sybase.com/swx/sdmain.stm
>
> Developer Community / Whitepapers
> http://www.ianywhere.com/developer
>
> CaseXpress - to report bugs
> http://casexpress.sybase.com
>
> CodeXchange - Free samples
> [url]http://ianywhere.codexchange.sybase.com/servlets/ ProjectDocumentList[
/url]
>



Reg Domaratzki \(iAnywhere Solutions\)

2006-01-12, 1:23 pm

stream is only a valid stream parameter when using the HotSync conduit and
not ULSocketStream() or ULHTTPStream(). I have a memory that at some point
we switched from silently ignoring invalid parameters to posting an error,
but I can't seem to find any proof of that. Whatever the case, I would
expect adding stream=tcpip to the StreamParms property when using
ULSocketStream() to return an error on Synchronization, should it should be
removed.

--
Reg Domaratzki, Sybase iAnywhere Solutions
Sybase Certified Professional - Sybase ASA Developer Version 8
Please reply only to the newsgroup

iAnywhere Developer Community : http://www.ianywhere.com/developer
iAnywhere Documentation : http://www.ianywhere.com/developer/product_manuals
ASA Patches and EBFs : http://downloads.sybase.com/swx/sdmain.stm
-> Choose SQL Anywhere Studio
-> Set filter to "Display ALL platforms IN ALL MONTHS"


"John Yovas" < johnca2000usNOSPAM@y
ahoo.com> wrote in message
news:43c6a058$1@foru
ms-2-dub...
> Here it is....
> if( csSyncType == TCPIP)
> {
> #ifdef _ASA902
> csStreamParms.Format(_T("host=%s;port=%s"), csHostIP,csPort);
> #else
> csStreamParms.Format(_T(" stream=tcpip;host=%s
;port=%s"),
> csHostIP,csPort);
> #endif
> }
>
>
> csMsg. Format(IDS_SYNC_MSG1
);
> if ( AfxMessageBox ( csMsg,MB_OKCANCEL ) == IDCANCEL )
> return FALSE;
>
> auto ul_synch_info synch_info;
> theApp.GetConnection()->InitSynchInfo( &synch_info );
>
> synch_info.user_name = csUserName. GetBuffer(csUserName
.GetLength());
> synch_info.password = csPassword. GetBuffer(csPassword
.GetLength());
> synch_info.version = UL_TEXT( "MOBILE43" );
> synch_info.observer = ObserverFunc;
> synch_info.stream_parms =
> csStreamParms. GetBuffer(csStreamPa
rms.GetLength());
>
> if( csSyncType == TCPIP)
> synch_info.stream = ULSocketStream();
> else
> synch_info.stream = ULHTTPStream();
>
>
> if ( theApp.GetConnection()->Synchronize(&synch_info))
> {
>
> "David Fishburn" <fishburn_spam@off.ianywhere.com> wrote in message
> news:Xns97495602A771
5fishburnsybasecom@1
27.0.0.1...
synch_info. stream_parms[color=d
arkred]
>
>



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