How to check if no connection set in setconnections()


Author
Message
kkchan
kkchan
StrataFrame Novice (96 reputation)StrataFrame Novice (96 reputation)StrataFrame Novice (96 reputation)StrataFrame Novice (96 reputation)StrataFrame Novice (96 reputation)StrataFrame Novice (96 reputation)StrataFrame Novice (96 reputation)StrataFrame Novice (96 reputation)StrataFrame Novice (96 reputation)
Group: Forum Members
Posts: 48, Visits: 97
Hi,

How could I know if user click cancel in connection manager wizard dialog (connectionmanager.setconnections())?



Thank you

StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
You can test the count of the DataSources collection after the SetConnections() method executes.

If MicroFour.StrataFrame.Data.DataBasics.DataSources.Count < 1 Then
    '-- Show some message....
End If

kkchan
kkchan
StrataFrame Novice (96 reputation)StrataFrame Novice (96 reputation)StrataFrame Novice (96 reputation)StrataFrame Novice (96 reputation)StrataFrame Novice (96 reputation)StrataFrame Novice (96 reputation)StrataFrame Novice (96 reputation)StrataFrame Novice (96 reputation)StrataFrame Novice (96 reputation)
Group: Forum Members
Posts: 48, Visits: 97
Hi,

Thank you.

How could I cancel application initialization after program detected no connection defined?

StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
In VB, you can just call End.  In C#, you would need to set a flag within the Program.cs file (in some private variable that you create) and then set the e.ExitApplication property to True within the ShowGateway() method and SF will let the application fall through.
kkchan
kkchan
StrataFrame Novice (96 reputation)StrataFrame Novice (96 reputation)StrataFrame Novice (96 reputation)StrataFrame Novice (96 reputation)StrataFrame Novice (96 reputation)StrataFrame Novice (96 reputation)StrataFrame Novice (96 reputation)StrataFrame Novice (96 reputation)StrataFrame Novice (96 reputation)
Group: Forum Members
Posts: 48, Visits: 97
hi,

Thank you.

Anyway to retrieve all connection string specified in DDT? I would like to add code to check if all specified connections are valid during application startup.

Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
Anyway to retrieve all connection string specified in DDT?

I am little confused on this question.  The DDT does not store any connection strings for your run-time application.  What are you trying to accomplish here?

kkchan
kkchan
StrataFrame Novice (96 reputation)StrataFrame Novice (96 reputation)StrataFrame Novice (96 reputation)StrataFrame Novice (96 reputation)StrataFrame Novice (96 reputation)StrataFrame Novice (96 reputation)StrataFrame Novice (96 reputation)StrataFrame Novice (96 reputation)StrataFrame Novice (96 reputation)
Group: Forum Members
Posts: 48, Visits: 97
Hi,

I want to test all required connections (open the connection) during startup. If any of this connection is not available, I would display connection string wizard to ask for new connection string.
StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
We have a method within our medical software that accesses a single record from the database while the splash screen is up to test the connection.  Other than attempting to access a table from the connection, I'm not sure of another way to test whether a connection string is valid.  So, wrap the access method in a try/catch and get a new connection string is an SqlException is thrown.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search