Can anyone show me how to do, in order to have one factory class mapping to a table in database a, and another factory class mapping to a table in database b ?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I use gentle 1.0.4 and ms sql server. I used the following trick to access another database on the same server:
[TableName("Helpdesk.dbo.Issues")]
class Issues:Persistent
{
}
Using the notation database.owner.table doesn't help you with authentication, but if you can use one login for both it is ok
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
and no, it doesn't even work!
even if i put in my factory constructor, this.broker = new PersistenceBroker("SQLServer", "Data Source=(local);Initial Catalog=ik;Integrated Security=True;Connection Timeout=1;"); it doesn't work!
it keeps saying: The table Messages to which type VPFrontWebCore.ik.hDoc maps does not exist.
anyone has an example ?
I'm currently making one in a simple solution, but still doesn't work at the moment.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I believe you need to access the databases in separate threads due to some internal caching of metadata. As far as I can remember data (obtained by the db abalyzer) is cached in a ThreadStatic marked member, so access to another provider/database would need to use a new thread to ensure that the analyzer runs again. This is required because type codes and other data is vendor specific (the DbType enum does not cover all required types, and Gentle does not yet have a generic type classification of its own).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Morten, as i already posted it, the namespace system doesn't work... or is ut just that there is something i missed ?
tell me if you wanna have my simple example sources: r0dy@r0dy.net
r0dy
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Morten, as i posted it, the namespace system doesn't work... or is it that i missed something ?
I've downloaded the sources, recompiled, put all as described in the config file, but no changes when calling classes from different namespaces!
If you wanna see my simple example sources, mail me at r0dy@r0dy.net
r0dy
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi
Can anyone show me how to do, in order to have one factory class mapping to a table in database a, and another factory class mapping to a table in database b ?
i got myself some kind of answer:
"One database, One project"
(and just add the reference in the first project)
r0dy
I use gentle 1.0.4 and ms sql server. I used the following trick to access another database on the same server:
[TableName("Helpdesk.dbo.Issues")]
class Issues:Persistent
{
}
Using the notation database.owner.table doesn't help you with authentication, but if you can use one login for both it is ok
and no, it doesn't even work!
even if i put in my factory constructor, this.broker = new PersistenceBroker("SQLServer", "Data Source=(local);Initial Catalog=ik;Integrated Security=True;Connection Timeout=1;"); it doesn't work!
it keeps saying: The table Messages to which type VPFrontWebCore.ik.hDoc maps does not exist.
anyone has an example ?
I'm currently making one in a simple solution, but still doesn't work at the moment.
I believe you need to access the databases in separate threads due to some internal caching of metadata. As far as I can remember data (obtained by the db abalyzer) is cached in a ThreadStatic marked member, so access to another provider/database would need to use a new thread to ensure that the analyzer runs again. This is required because type codes and other data is vendor specific (the DbType enum does not cover all required types, and Gentle does not yet have a generic type classification of its own).
Can you provide code example for accessing multiple database in one project ?
10x in advance.
it doesn't work at all... as i said in the "still multibase problems" post, even with the last code progresses, we're unable to make it.
r0dy
i've tried it but that doesn't work for me, thnx anyway.
r0dy
If you're still having this problem, could you perhaps try to debug it and let me know where Gentle breaks?
Also, did you notice that it's possible to map a namespace to a certain database using the config file:
<NamespaceProviders>
<Namespace namespace="Northwind" provider="SQLServer" connectionstring="data source=localhost;initial catalog=Northwind;" />
<Namespace namespace="Example.Pubs" provider="SQLServer" connectionstring="data source=localhost;initial catalog=Pubs;" />
</NamespaceProviders>
When present, these will be used in place of the DefaultProvider, for classes matching the namespace.
Morten, as i already posted it, the namespace system doesn't work... or is ut just that there is something i missed ?
tell me if you wanna have my simple example sources: r0dy@r0dy.net
r0dy
Morten, as i posted it, the namespace system doesn't work... or is it that i missed something ?
I've downloaded the sources, recompiled, put all as described in the config file, but no changes when calling classes from different namespaces!
If you wanna see my simple example sources, mail me at r0dy@r0dy.net
r0dy