Getting connection information from vs 2008 generated code

  • Thread starter Thread starter John
  • Start date Start date
J

John

Hi

I have developed a winform db app by dragging fields onto a form in vs 2008
i.e. I have not written code to open db connection myself and instead have
let vs 2008 generate that code under the hood automatically. My question is,
is there a way to get a handle to the db connection created by vs 2008?

Thanks

Regards
 
John,

If you don't want to write any code, then have a look at the created config
file in XML.

Cor
 
how about the table adaptor that the VS generate for you?
or take close look the designer generated code and search for connection

Sorry I am vague as I only use the C# 2008 and still using vb 2005
 
in addition to the other respondends:

Note that .Net has a disconected architecture, so the connection object is
inmediatly disposed of after its usage to get or set data

Intercation with the database is in my opinion the easiest through the Table
adapters that are generated by the designer
however it is verry easy to set up connection objects yourself through the
connection string setting in the config file

hth

Michel
 
Back
Top