cancel
Showing results for 
Search instead for 
Did you mean: 

SQL Anywhere 16 - Mobilink --{ml ignore} provokes an ODBC error

Former Member
0 Kudos


Using the --{ml ignore} option always seems to provoke an ODBC error - [10002] Consolidated database server or ODBC error:  ODBC: [Microsoft] [ODBC Driver Manager] Invalid string or buffer length ) ODBC State = HY090, Native error code = 0).

SQL Anywhere 16 remote DB, ASE 15.7 Consolidated, Mobilink running on a Windows 7 box.  Mobilink upload_insert script "--{ml ignore}" ODBC connection build using the SQL Anywhere 16 64 bit drivers (Bin64\dbodbc16.dll)

The (development) ODBC connector looks like this:

[HKEY_CURRENT_USER\Software\ODBC\ODBC.INI\access_remote16]

"AutoStop"="YES"

"DatabaseFile"="c:\\******\\access_remote.db"

"DatabaseName"="access_remote"

"Integrated"="NO"

"PWD"="**********"

"ServerName"="access_remote"

"UID"="********"

"Driver"="C:\\PROGRA~1\\SQLANY~2\\Bin64\\dbodbc16.dll"

The documentation doesn't suggest any problems of this sort, so I'm guessing that the problem comes from the ODBC connector not knowing how to handle a return that has nothing in it, but I'm not sure how to configure the connector to handle it.

Can anyone help?

Accepted Solutions (0)

Answers (1)

Answers (1)

regdomaratzki
Advisor
Advisor
0 Kudos

What does your ml_add_table_script call look like when you create the upload_insert event?  The following worked perfectly for me :

call ml_add_table_script( 'v16', 'Admin', 'upload_insert', '--{ml_ignore}');

I've attached a file (cons.txt) that shows how I create the SQL Anywhere consolidated database, and the associated MobiLink Server log file with -v+ (mlsrv16.txt) that is created when a synchronization occurs.


Reg

Former Member
0 Kudos

The upload_insert script looks like this:
ml_add_table_script 'version1', 'Benefit_Unit_Status_Log', 'upload_insert',
'--{ml ignore}'

go

I'm also attaching the server setup and an extract from the server log.

Thanks for the quick response.

regdomaratzki
Advisor
Advisor
0 Kudos

I missed this in your first post :

You are using ASE as your consolidated database, but using the SQL Anywhere ODBC Driver to connect MobiLink to the ASE consolidated database?  That won't work, and I'm actually shocked you got as far as you did.

If your consolidated database is ASE, you should be using an ASE ODBC Driver to connect the ML Server to the consolidated database.

See http://scn.sap.com/docs/DOC-40721 for the recommendation on the ODBC Driver you should be using.

Reg

Former Member
0 Kudos

I have to apologize - I mis-wrote.  The SQL Anywhere ODBC connection is from my application to the SQL Anywhere database, and isn't involved in synchronization.  The Mobilink server uses an ASE ODBC connector to reach the Consolidated database.  That connection looks like this:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\access_test]
"Driver"="C:\\Sybase\\DataAccess64\\ODBC\\dll\\sybdrvodb64.dll"
"dsn"="access_test"
"dsprincipal"=""
"secondaryport"=""
"logintimeout"="15"
"restrictmaximumpacketsize"="0"
"normalizewcharparams"="0"
"ignoreerrorsifrspending"="0"
"initializationstring"=""
"alternateservers"=""
"dsservicename"=""
"database"="access_test"
"packetsize"=""
"encryptpassword"="0"
"server"="xxxxxxxxxxx.state.or.us"
"serverinitiatedtransactions"="0"
"quotedidentifier"="0"
"charset"="NoConversions"
"ansinull"="1"
"fetcharraysize"="25"
"servicename"=""
"language"=""
"buffercachesize"="20"
"trustedfile"=""
"tightlycoupledtransaction"="0"
"serverprincipal"=""
"port"="7400"
"userid"="********"
"hasession"="0"
"enableserverpacketsize"="1"
"applicationname"=""
"userprincipal"=""
"description"=""
"dsurl"=""
"crc"="1"
"backendtype"="ASE"
"dynamicprepare"="0"
"enableloblocator"="0"
"secondaryserver"=""
"textsize"=""
"clienthostproc"=""
"clienthostname"=""

Former Member
0 Kudos

I see what seems to be a simple single character substitution error in your script that could be all there is to this issue.

Your response (and confirmed by what I see in your ML_Server_Log.txt.zip) you have:

'--{ml ignore}'

but should have this instead:

'--{ml_ignore}'

The missing underscore character ('_') turns off any special meaning and turns this important 'ML tag' into a simple SQL comment that gets stripped out in the translation.