Trying to Configure Connection to 2 Different DataBases


Author
Message
Terry Bottorff
Terry Bottorff
Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)
Group: Forum Members
Posts: 448, Visits: 12K
I have the following code in my AppMain and when I first run the application it runs through the connection manager and I attach it to the correct databases. One is on the Web and one is Local.
I have a form that just uses the Web DataBase and I have the BO's DataSourceKey all set to WebProRodeoData. It works as I want it too.
Now I am setting up a form where I want to connect to my local data and I have set the BO's DataSourceKey to LocalProRodeoData2
but I get the attached error when I try to configure the BO in the BOM. 
Is there something else I should be doing?

      ConnectionManager.ApplicationKey = "ProRodeoUpdateWeb"
      ConnectionManager.ApplicationDefaultTitle = "ProRodeoUpdateWeb Connection"
      ConnectionManager.ApplicationDefaultDescription = "This application connection is used by ProRodeoUpdateWeb"
         '-- Set the required data source information so that the ConnectionManager can gather it
        '      SQL Connection
        ConnectionManager.AddRequiredDataSourceItem("WebProRodeoData""SQL Connection", _
         DataSourceTypeOptions.SqlServer, "WebRodeoData""This connection is used by Pro-Rodeo Web Data.")
         '-- Set the required data source information so that the ConnectionManager can gather it
        '      SQL Connection
        ConnectionManager.AddRequiredDataSourceItem("LocalProRodeoData2""SQL Connection", _ 

         DataSourceTypeOptions.SqlServer, "LocalRodeoData""This connection is used by Pro-Rodeo Local Data.")

TIA.


Attachments
BOMapperError.png (103 views, 38.00 KB)
Edhy Rijo
E
StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi Terry,
The database connection in the BOM has nothing to do with the connection in your AppMain.vb file.  The BOM only needs to get a connection to a database with the same data structure as the one you will be using in your application so it can read the table schema and create the BO fields for you.  If you would use the DDT, then you should map your BOM to the DDT instead of the database except for views which will need to be read from any database.

So bottom line is this:
  1. Make sure the BOM connection is to any local database that has the same structure as expected for your application.
  2. The connections in your AppMain.vb looks just fine.


Edhy Rijo

Terry Bottorff
Terry Bottorff
Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)
Group: Forum Members
Posts: 448, Visits: 12K
Yes Sir Edhy a Direct Hit. Just like always exactly what it took to fix the problem. Thank you so much.
Edhy Rijo
E
StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
You are welcome Terry, glad it worked out for you.

Edhy Rijo

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