#1 2019-10-15 01:06:13

nikotin
Member
Registered: 2019-10-15
Posts: 2

how to map to a non-standard schema table

I use MSSQL as my external database, and some tables belong to a non-default database schema(default is dbo). so if i want to map the TSQLRecord classes to these tables, i need to specify the corresponding schema names as well. But it seems to me a TSQLRecord class name just maps to a table name directly, there is no way to specify the table's schema name. Any one encounter this problem can give me a help? Thanks a lot!

Offline

#2 2019-10-15 08:56:12

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,272
Website

Re: how to map to a non-standard schema table

With external databases, you have access to the TSQLRecord mapping via TSQLRecordPropertiesMapping.

In practice, when you call VirtualTableExternalRegister(), set the aExternalTableName optional field.
See https://synopse.info/files/html/Synopse … ml#TITL_30
You can also call VirtualTableExternalMap() if you prefer.

Offline

#3 2019-10-15 09:08:02

nikotin
Member
Registered: 2019-10-15
Posts: 2

Re: how to map to a non-standard schema table

thanks, ab. I think problem solved!

Offline

Board footer

Powered by FluxBB