hth|||yeah, thats what I always do. But my job requires me to create a lot of new apps and I just need to know if theirs some quick way of ascertaining the connection details for one of those new apps.|||You can invoke the OLEDB Connection wizard and get the string from the that. Not really automatic but it gives you all the necessary details.|||where do i do that? thanks again!!|||The dialog is the same one you get when use a OLEDbConnection object. However, I've just had a look for how you invoke that from .net and can't find a managed version or wrapper. So unless someone else can provide you with that you'd have to make a p/invoke to the old API or maybe a COM interface. Sorry :(
Wednesday, March 28, 2012
Is there a quick and easy way of getting a connection string for my app
I'm wondering if theres some easy/simple way of getting what would be the connection string if say I was using visual studio? I'm just tired of having to fiddle with a db connection string because i've missed a letter or a comma.why dont you store the connection string in the web.config file...so you dont have to worry abt it...also its more flexible..even if you change your db...you only need to change it at one place..
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment