Database name (local/remote)


Author
Message
Chan
Chan
Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)
Group: Forum Members
Posts: 533, Visits: 2K
Hi,

I have questions as below:



1. How could I allow user to decide database name during DDT deployment?

2. I have some view that join tables from local and remote database. The remote database name could be vary among customer even though it is has the same structure. How could I tell DDT at runtime so that it will "change" my view defination to map to the remote database?



Please advice.



Thank you
Reply
Keith Chisarik
Keith Chisarik
StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)
Group: StrataFrame Users
Posts: 939, Visits: 40K
1) If using ASP.NET (I think you do from past posts) when you go to do #1, you will find that the database migrator class looks for a control/object that supports INVOKE as the third parameter, since web controls dont you will have to create your own as a workaround. I have a web application that allows users to do just this, name and create their own databases. I just add a _XXX identifier to them so I know which ones to update when it comes time.

Public Class DBMigratorInvokeObject

Implements System.ComponentModel.ISynchronizeInvoke

Public Function BeginInvoke(ByVal method As System.Delegate, ByVal args() As Object) As System.IAsyncResult Implements System.ComponentModel.ISynchronizeInvoke.BeginInvoke

Throw New NotSupportedException()

End Function

Public Function EndInvoke(ByVal result As System.IAsyncResult) As Object Implements System.ComponentModel.ISynchronizeInvoke.EndInvoke

Throw New NotSupportedException()

End Function

Public Function Invoke(ByVal method As System.Delegate, ByVal args() As Object) As Object Implements System.ComponentModel.ISynchronizeInvoke.Invoke

Return method.DynamicInvoke(args)

End Function

Public ReadOnly Property InvokeRequired() As Boolean Implements System.ComponentModel.ISynchronizeInvoke.InvokeRequired

Get

Return True

End Get

End Property

End Class



Keith Chisarik
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Chan - 17 Years Ago
Trent L. Taylor - 17 Years Ago
Chan - 17 Years Ago
Trent L. Taylor - 17 Years Ago
Chan - 16 Years Ago
                         That could be more difficult. I would probably create a view that is...
Trent L. Taylor - 16 Years Ago
                             Hi,
Is it possible to access DatabaseMigrator property within...
Chan - 16 Years Ago
                                 Yeah, that is not a bad idea on the dummy database. When you pick the...
Trent L. Taylor - 16 Years Ago
                                     Hi,
I would like to add-on is that, I found that profile script...
Chan - 16 Years Ago
                                         Well, if you want to implement .NET, code, then I suggest creating a...
Trent L. Taylor - 16 Years Ago
                                             Hi,
Hmmm... the reason to use .NET code in my case is not to...
Chan - 16 Years Ago
                                                 Well, at this point there is not anything like that from directly...
Trent L. Taylor - 16 Years Ago
                                     [quote][b]Trent L. Taylor (01/22/2009)[/b][hr]Yeah, that is not a bad...
Chan - 16 Years Ago
Keith Chisarik - 17 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search