Home > Archive > SQL Anywhere Mobile > April 2005 > connection scripts









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 connection scripts
MJN

2005-04-13, 3:24 am

Am alittle confused about where I see the connection scripts in Sybase
Central.
If I open the db (Adaptive Server Anywhere 9) then look in the table
ml_scripts, I can thus see the sripts.
But if I open the db in Mobilink Synchronization 9 and open the folder
connection scripts then there is nothing in there....

I have a service running for Mobilink to connect to the consolidated db and
another service for ASA so have both engines running fine. Should I be
seeing the scripts in both places or not???

Thanks

ASA 9.02


David Fishburn

2005-04-13, 9:24 am

"MJN" < SpamFilterOnlychuck1
rar@yahoo.com> wrote in
news:425ca31e$1@foru
ms-1-dub of sybase.public.sqlanywhere.mobilink:

M> Am alittle confused about where I see the connection scripts in Sybase
M> Central.
M> If I open the db (Adaptive Server Anywhere 9) then look in the table
M> ml_scripts, I can thus see the sripts.

What DSN did you use to connect to this DB?


M> But if I open the db in Mobilink Synchronization 9 and open the folder
M> connection scripts then there is nothing in there....

Which DSN did you use to connect this plugin to the database?


M> I have a service running for Mobilink to connect to the consolidated
M> db and another service for ASA so have both engines running fine.
M> Should I be seeing the scripts in both places or not???

The scripts *only* exist in the consolidated database. The remote
ASA/UltraLite databases do not contain any scripts.


--
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]

MJN

2005-04-14, 3:24 am

I used the same dsn as for the consolidated...
But I would expect to see the scripts in central when I am connected to the
consoldiated..
"David Fishburn" <fishburn_spam@off.ianywhere.com> wrote in message
news:Xns9637671DBCFF
fishburnsybasecom@12
7.0.0.1...
> "MJN" < SpamFilterOnlychuck1
rar@yahoo.com> wrote in
> news:425ca31e$1@foru
ms-1-dub of sybase.public.sqlanywhere.mobilink:
>
> M> Am alittle confused about where I see the connection scripts in Sybase
> M> Central.
> M> If I open the db (Adaptive Server Anywhere 9) then look in the table
> M> ml_scripts, I can thus see the sripts.
>
> What DSN did you use to connect to this DB?
>
>
> M> But if I open the db in Mobilink Synchronization 9 and open the folder
> M> connection scripts then there is nothing in there....
>
> Which DSN did you use to connect this plugin to the database?
>
>
> M> I have a service running for Mobilink to connect to the consolidated
> M> db and another service for ASA so have both engines running fine.
> M> Should I be seeing the scripts in both places or not???
>
> The scripts *only* exist in the consolidated database. The remote
> ASA/UltraLite databases do not contain any scripts.
>
>
> --
> 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\)

2005-04-14, 9:24 am

The ml_script table is showing both table level scripts and connection level
scripts. Are you sure you've defined both kinds?

If you open the consolidated database and execute "select * from
ml_connection_script
s" (ml_connection_scrip
ts is a view), does this return
any rows? I suspect it's empty, but the ml_table_scripts view will likely
show you the same scripts you see when you the scripts you saw in the
ml_script table. I also suspect that if you go into the Synchronized Table
folder in the Mobilink Plug-in in Sybase Central and then browse throw the
tables, you'll see the scripts you're looking for there.

--
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 "Platform Preview" and "Time Frame" to ALL

"MJN" < SpamFilterOnlychuck1
rar@yahoo.com> wrote in message
news:425e19f5@forums
-2-dub...
> I used the same dsn as for the consolidated...
> But I would expect to see the scripts in central when I am connected to

the
> consoldiated..
> "David Fishburn" <fishburn_spam@off.ianywhere.com> wrote in message
> news:Xns9637671DBCFF
fishburnsybasecom@12
7.0.0.1...
Sybase[color=darkred
]
folder[color=darkred
]
>
>



Greg Fenton

2005-04-14, 9:24 am

MJN wrote:
> If I open the db (Adaptive Server Anywhere 9) then look in the table
> ml_scripts, I can thus see the sripts.
> But if I open the db in Mobilink Synchronization 9 and open the folder
> connection scripts then there is nothing in there....
>


The ML configuration tables (ml_*) are simply standard base tables in
your consolidated database. So you can indeed see the tables and their
contents by using the ASA-plugin for Sybase Central.

Using the ML-plugin for Sybase Central, the plugin gives you a view of
the data in those base tables in the same way that the ML server queries
the tables.

It is quite possible that you have scripts in the ml_script table that
are not associated with a script version in the ml_script_version table.
Or possibly that you have not associated a script (ml_script) with a
particular script version (ml_script_version) to a particular
"synchronized table" (ml_table).

One thing you might try is connecting to the consolidated with DBISQL
and running the following SQL code which extracts all of your ML scripts
and outputs them to a file. This script emulates the "view" of the
scripts as seen by MobiLink:

*************
UNLOAD
SELECT 'call ml_add_lang_table_sc
ript' ||
'( ''' ||v.name||
''', ''' ||t.name||
''', ''' ||ts.event||
''', ''' ||s.script_language||
''', ''\x0D\x0A' ||replace(s.script, '''', '''''')||
'\x0D\x0A'' );\x0D\x0A'
FROM ml_table t,
ml_table_script ts,
ml_script s,
ml_script_version v
WHERE ts.version_id = v.version_id
AND t.table_id = ts.table_id
AND ts.script_id = s.script_id

UNION ALL

SELECT 'call ml_add_lang_connecti
on_script' ||
'( ''' ||v.name||
''', ''' ||cs.event||
''', ''' ||s.script_language||
''', ''\x0D\x0A' || replace(s.script,'''', '''''')||
'\x0D\x0A'' );\x0D\x0A'
FROM ml_script_version v
KEY JOIN ml_connection_script
cs
KEY JOIN ml_script s

to 'C:\ML_scripts.sql'
quotes off
escapes off
delimited by '';
*************

The above code will generate the file C:\ML_scripts.sql.


--
Greg Fenton
Consultant, Solution Services, iAnywhere Solutions
--------
Visit the iAnywhere Solutions Developer Community
Whitepapers, TechDocs, Downloads
http://www.ianywhere.com/developer/
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