Retrieving connection string without using ConnectionManager


Author
Message
Doug Birtell
Doug Birtell
StrataFrame Beginner (33 reputation)StrataFrame Beginner (33 reputation)StrataFrame Beginner (33 reputation)StrataFrame Beginner (33 reputation)StrataFrame Beginner (33 reputation)StrataFrame Beginner (33 reputation)StrataFrame Beginner (33 reputation)StrataFrame Beginner (33 reputation)StrataFrame Beginner (33 reputation)
Group: Forum Members
Posts: 33, Visits: 64
A little background...

1) I am using click once deployment, and I do not want the user to see the database setup wizard.

2) because of #1, I have to use DataLayer.DataSources.Add to add my database connection

3) The main application (Program.cs) runs many other SF forms.

4) Some of these SF forms read data directly (do not use BO's)

so far so good?

Question: How can I create s SQLConnection and pass it the ConnectString without using ConnectionManager to get it?

i.e.how can I get the connection string from the datalayer? I really don't want to code the connectstring in all of my forms that need it when not using the BO to get the data.

I know this is probably so obvious it's stupid, but....

Thanks in advance.

Doug


Replies
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
That's it, Bill..good answer.  Also, Doug, I thought I would mention that you can use a BusinessBindingSOurce as the data source fora  report.  This is how we do our reports within our medical software.  In fact, I am hoping to release a sample that shows how to use Report-Shooter with a BBS. 
Doug Birtell
Doug Birtell
StrataFrame Beginner (33 reputation)StrataFrame Beginner (33 reputation)StrataFrame Beginner (33 reputation)StrataFrame Beginner (33 reputation)StrataFrame Beginner (33 reputation)StrataFrame Beginner (33 reputation)StrataFrame Beginner (33 reputation)StrataFrame Beginner (33 reputation)StrataFrame Beginner (33 reputation)
Group: Forum Members
Posts: 33, Visits: 64
Bill ! ! !

That's exactly what I was looking for.  Worked perfectly. 

Trent,

I'll look forward to seeing your example on using the BBS in reporting.  Maybe I'm just too used to doing things the old fashioned way

Thanks for all the help!

Doug

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