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

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
Hi,



I have also found it quite beneficial to code my application so that little or no changes are required to the code between development and production, for web applications my applications detects the domain space the app is using (localhost versus www.something) ** thanks again Trent for this idea ** and pulls the appropriate connection string from a shared class. I do something similar for desktops. I used to have to replace connection strings before compilation for production and naturally missed a few along the way, now I just write it up from to be aware of its surroundings and forget about it. The only time I have to change that logic is if a server changes frequently, which is not the case for me in most applications. In the one instance that was a consideration I still wrote the class, I just pulled the encrypted strings from an XML file.



Also two lines of code can plug the connection manager functionality into you application when an admin user might have to change the connection string.



Good luck.

Keith Chisarik
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




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

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

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search