Determine number of tables in a publication using .Net runtime

Greetings !!

I have been trying to determine the number of tables in a
publication. Is there a way to fetch this at runtime (using
any ultralite .Net API) ?

thanks
0
kapa25985
12/14/2010 6:12:10 AM
sybase.sqlanywhere.ultralite 2982 articles. 0 followers. Follow

4 Replies
622 Views

Similar Articles

[PageSpeed] 33

This is a multi-part message in MIME format.

------=_NextPart_000_008C_01CB9C50.34D51E50
Content-Type: text/plain;
	charset="koi8-r"
Content-Transfer-Encoding: base64

T24gOS4wLjIgc2VlIFVMQ29ubmVjdGlvbi5TY2hlbWEuR2V0VGFibGVDb3VudEluUHVibGljYXRp
b25zKGludCBtYXNrKSANCk1hc2sgeW91IGNhbiBkZWZpbmUgYnkgdXNpbmcgcHJvcGVydHkgTWFz
ayBvZiBwdWJsaWNhdGlvbiBzY2hlbWEgKGZvciBleGFtcGxlIFVMQ29ubmVjdGlvbi5TY2hlbWEu
R2V0UHVibGljYXRpb25TY2hlbWEobmFtZV9vZl9wdWJsaWNhdGlvbikuTWFzaykNCg0KLS0gDQpC
ZXN0IHJlZ2FyZHMsDQoNCkFsZXggVXNtYW5vdg0KQVNBXE1MXFVMIDkuMC4yLjM5MjQNCg0KICA8
a2FwYTI1OTg1PiDTz8/C3cnML9PPz8LdyczBINcgzs/Xz9PU0cgg08zFxNXA3cXFOiBuZXdzOjRk
MDcwYWJhLjE5NGQuMTY4MTY5Mjc3N0BzeWJhc2UuY29tLi4uDQogIEdyZWV0aW5ncyAhIQ0KDQog
IEkgaGF2ZSBiZWVuIHRyeWluZyB0byBkZXRlcm1pbmUgdGhlIG51bWJlciBvZiB0YWJsZXMgaW4g
YQ0KICBwdWJsaWNhdGlvbi4gSXMgdGhlcmUgYSB3YXkgdG8gZmV0Y2ggdGhpcyBhdCBydW50aW1l
ICh1c2luZw0KICBhbnkgdWx0cmFsaXRlIC5OZXQgQVBJKSA/DQoNCiAgdGhhbmtzDQo=

------=_NextPart_000_008C_01CB9C50.34D51E50
Content-Type: text/html;
	charset="koi8-r"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FVT1RFIA0Kc3R5bGU9IkJPUkRFUi1MRUZUOiAj
MDAwMDAwIDJweCBzb2xpZDsgUEFERElORy1MRUZUOiA1cHg7IFBBRERJTkctUklHSFQ6IDBweDsg
TUFSR0lOLUxFRlQ6IDVweDsgTUFSR0lOLVJJR0hUOiAwcHgiPg0KICA8RElWPiZsdDtrYXBhMjU5
ODUmZ3Q7INPPz8Ldycwv08/Pwt3JzMEg1yDOz9fP09TRyCDTzMXE1cDdxcU6IDxBIA0KICBocmVm
PSJuZXdzOjRkMDcwYWJhLjE5NGQuMTY4MTY5Mjc3N0BzeWJhc2UuY29tIj5uZXdzOjRkMDcwYWJh
LjE5NGQuMTY4MTY5Mjc3N0BzeWJhc2UuY29tPC9BPi4uLjwvRElWPkdyZWV0aW5ncyANCiAgISE8
QlI+PEJSPkkgaGF2ZSBiZWVuIHRyeWluZyB0byBkZXRlcm1pbmUgdGhlIG51bWJlciBvZiB0YWJs
ZXMgaW4gDQogIGE8QlI+cHVibGljYXRpb24uIElzIHRoZXJlIGEgd2F5IHRvIGZldGNoIHRoaXMg
YXQgcnVudGltZSAodXNpbmc8QlI+YW55IA0KICB1bHRyYWxpdGUgLk5ldCBBUEkpID88QlI+PEJS
PnRoYW5rczxCUj48L0JMT0NLUVVPVEU+PC9CT0RZPjwvSFRNTD4NCg==

------=_NextPart_000_008C_01CB9C50.34D51E50--

0
Usmanov
12/15/2010 9:04:33 AM
Hi!

What version of UL are you using?
I think the GetTableCountInPublications() method may not exist in newer 
versions, but it's certainly possible to calculate this number by iterating 
over the table schemas.
I'm also curious: why do you need to get this number at runtime?

Regards,
- Tim

<kapa25985> wrote in message news:4d070aba.194d.1681692777@sybase.com...
> Greetings !!
>
> I have been trying to determine the number of tables in a
> publication. Is there a way to fetch this at runtime (using
> any ultralite .Net API) ?
>
> thanks 


0
Tim
12/15/2010 6:35:02 PM
Hi!!
thanks for the suggetion.

I'm using UL 11.0

Well i just want to know how many tables will take part in
sync.


> Hi!
>
> What version of UL are you using?
> I think the GetTableCountInPublications() method may not
> exist in newer  versions, but it's certainly possible to
> calculate this number by iterating  over the table
> schemas. I'm also curious: why do you need to get this
> number at runtime?
>
> Regards,
> - Tim
>
> <kapa25985> wrote in message
> > news:4d070aba.194d.1681692777@sybase.com... Greetings !!
> >
> > I have been trying to determine the number of tables in
> > a publication. Is there a way to fetch this at runtime
> > (using any ultralite .Net API) ?
> >
> > thanks
>
>
0
kapa25985
12/23/2010 2:59:02 PM
....and why do you want to know the number of tables that will sync? :-) 
(Just trying to understand so we can make UL better...)

Note also that there's a CountUploadRows() method which returns how many 
rows need to be synchronized (from the client). (This is a very fast 
operation in v12 if there are no table predicates in the publication(s).) 
This can give you an idea of how much data needs to be synchronized.

And the sync progress callback/listener tells you how many tables are about 
to be synchronized too - check the sync_table_count/SyncTableCount 
field/property in the "STARTING" state (which is before any network or 
database activity, and at which point you could cancel the sync 
programmatically).

- Tim

<kapa25985> wrote in message news:4d1363b6.7f87.1681692777@sybase.com...
> Hi!!
> thanks for the suggetion.
>
> I'm using UL 11.0
>
> Well i just want to know how many tables will take part in
> sync.
>
>
>> Hi!
>>
>> What version of UL are you using?
>> I think the GetTableCountInPublications() method may not
>> exist in newer  versions, but it's certainly possible to
>> calculate this number by iterating  over the table
>> schemas. I'm also curious: why do you need to get this
>> number at runtime?
>>
>> Regards,
>> - Tim
>>
>> <kapa25985> wrote in message
>> > news:4d070aba.194d.1681692777@sybase.com... Greetings !!
>> >
>> > I have been trying to determine the number of tables in
>> > a publication. Is there a way to fetch this at runtime
>> > (using any ultralite .Net API) ?
>> >
>> > thanks
>>
>> 


0
Tim
12/23/2010 6:41:46 PM
Reply: