Database Connection Wizard Problem


Author
Message
Clayton Hoyt
Clayton Hoyt
StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)
Group: Forum Members
Posts: 40, Visits: 85
Hi Folks

I am an sysadmin on my laptop to my SQL2005 default instance but when I try to use the Database Connection Wizard, the Database droplist is disabled and only shows Strataframe as the database. I also tried this with the SA account without success.  How can I get this list enabled?

Clay

Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
You can't.  The data source connection you are trying to change is the StrataFrame Data Store connection.  We prevent this from being changed because this is that StrataFarme connection, not the connection associated with your application.  You specify the connection for your appliction the the SetDataSources method in a WinForm app or you can just manually specify the connection:

MicroFour.StrataFrame.Data.Databasics.DataSources.Add(New SqlDbDataSourceItem("","YourConnectionString"))

If you use the connection wizard, you will use the AddrequiredDataSourceItem and the SetConnections in the SetDataSources method of the AppMain.vb or program.cs file.

Daniel Essin
Daniel Essin
StrataFrame User (267 reputation)StrataFrame User (267 reputation)StrataFrame User (267 reputation)StrataFrame User (267 reputation)StrataFrame User (267 reputation)StrataFrame User (267 reputation)StrataFrame User (267 reputation)StrataFrame User (267 reputation)StrataFrame User (267 reputation)
Group: Forum Members
Posts: 235, Visits: 309
Followup question:



If I use the Database Connection menu item in VS and choose new, the database dropdown is still grayed out and unavailable. I understand how to do it in code.



Under what circumstances would you use the Database Connection dialog to add a database and is the database list ever enabled when you are in design mode in VS?



Thank you
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
The reason this is grayed out through the Visual Studio environment is to avoid the question you would ask next if you changed this value to something other than StrataFrame.  StrataFrame uses the Connection String Wizard as well and if you change this to YOUR database then it would not work.  This is the connection to the StrataFrame database which is used through the framework....NOT your connection to your application at run-time.  Your connection string should be assigned in the AppMain.vb or program.cs file in teh SetDatabases method.
Daniel Essin
Daniel Essin
StrataFrame User (267 reputation)StrataFrame User (267 reputation)StrataFrame User (267 reputation)StrataFrame User (267 reputation)StrataFrame User (267 reputation)StrataFrame User (267 reputation)StrataFrame User (267 reputation)StrataFrame User (267 reputation)StrataFrame User (267 reputation)
Group: Forum Members
Posts: 235, Visits: 309
I thought that might be the answer. If I'm handling the connections in the startup code, I'm not clear then about when I would want to use the Database Connection menu item or for what.



Thanks
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
The menu item in Visual Studio is STRICTLY for setting a connection the StrataFrame database and is used to house BO Mappings, Role-Based Security projects, DDT projects, etc.  The connection for your application will be defined in the AppMain.vb or program.cs file in the SetDatabases() method.  I recommend looking at the docs on this and even look at the samples as they all use the Connection String Manager and call SetConnections().  If you are going to setup the connection string yourself, then look in the docs for the DataSources collection and manually specify the connection yourself.
Daniel Essin
Daniel Essin
StrataFrame User (267 reputation)StrataFrame User (267 reputation)StrataFrame User (267 reputation)StrataFrame User (267 reputation)StrataFrame User (267 reputation)StrataFrame User (267 reputation)StrataFrame User (267 reputation)StrataFrame User (267 reputation)StrataFrame User (267 reputation)
Group: Forum Members
Posts: 235, Visits: 309
Thanks for clarifying that. I have been setting connections in code and that works fine. For some reason I got the notion that the dialog might be there for a more general purpose but I understand now that it is not.
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