Database Connection Problems


Author
Message
Bill Cunnien
Bill Cunnien
StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)
Group: Forum Members
Posts: 785, Visits: 3.6K
After installation, I was able to successfully create a business object and map it to a table on my remote database.  A new form was created, the business object attached and some fields slapped on for testing.  No errors upon the build; however, if I run the debugger, the application fails nearly immediately with some such statement that my DataLayer is out of whack.  If I goof around with the program.cs file, I can get a database connection popup to occur when I start the app...it is looking for the "missing" connection information:  server name, authentication, database name.  If I provide all of that, then I get an unathentication error.  What am I doing wrong?  I am going through the tutorial, but any kind of hint would be helpful on this...thanks!

Bill

Replies
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (4.8K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
Your getting closer BigGrin



The connection to the StrataFrame db is used only at design time and only by the tools within VS, such as the BO Mapper, the security dialog, the localization dialog and by the SF addin within VS. Thus you never need to set that connection within the application itself. You set that connection on the SF menu within VS. The connection to the SF database is only needed on the development machine, never on any machine running your app.



Within the application, you setup any connections you need (as many as needed...I'm using two, one for security and one for the app data, I believe I remember seeing posts of users using many connections, one db for each region supported by the db and the connections can be to different kinds of databases, I.e. you could connect to a SQL Server, Oracle and Access all in the same app). For each connection you have (roughly) two choices: use the connection manager or set the connection manually using the DataLayer.DataSources() collection directly. The difference is that if you use the connection manager, the user needs to know how to log onto the database. This could be fine in many circumstances and not fine in many others. BigGrin If you use the DataLayer.DataSources() collection, the connection information can be set automatically and the user need not know anything about the connection or the database. Again, there are times when this is needed and times when it isn't.



For your initial learning, I'd skip this part, just use the connection manager (which is the code that is enabled within SetDataSources in AppMain when a SF project is used) and work through some of the other stuff first. Get a bit more comfortable with how BOs work, with data binding and with some of the SF controls. Then come back to this. Keep the questions coming too...it really helps as you work through each of these concepts. BigGrin
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
That's a pretty darn good explanation, Greg; you're on top of it.  Thanks.
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (4.8K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
Any time. I'm glad I'm starting to get a clue after...oh...8,000,000,000 posts asking questions just like this Blink
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Bill Cunnien - 19 Years Ago
Bill Cunnien - 19 Years Ago
Trent L. Taylor - 19 Years Ago
Bill Cunnien - 19 Years Ago
Greg McGuffey - 19 Years Ago
Bill Cunnien - 19 Years Ago
Bill Cunnien - 19 Years Ago
                         [quote] Does the BO database(s) have to reside on the same server as...
Trent L. Taylor - 19 Years Ago
                             This line seems important to the accessibility of the data for the...
Bill Cunnien - 19 Years Ago
                                 I copied the connection string from my Business Object Mapper project...
Bill Cunnien - 19 Years Ago
                                 There are two ways to manage your connection(s):
- using the...
Greg McGuffey - 19 Years Ago
                                     Thanks, Greg...things are getting a bit clearer. For DB development, I...
Bill Cunnien - 19 Years Ago
                                         Your getting closer :D

The connection to the StrataFrame db...
Greg McGuffey - 19 Years Ago
                                             That's a pretty darn good explanation, Greg; you're on top of it....
StrataFrame Team - 19 Years Ago
                                                 Any time. I'm glad I'm starting to get a clue...
Greg McGuffey - 19 Years Ago
Keith Chisarik - 19 Years Ago
Peter Denton - 19 Years Ago
Greg McGuffey - 19 Years Ago
Trent L. Taylor - 19 Years Ago
Peter Denton - 19 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search