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

Re: Getting connection information from vs 2008 generated code by Cor

Cor
Sat Feb 02 23:39:53 CST 2008

John,

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

Cor

"John" <John@nospam.infovis.co.uk> schreef in bericht
news:OtqQvfgZIHA.5900@TK2MSFTNGP02.phx.gbl...
> 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
>


Re: Getting connection information from vs 2008 generated code by GS

GS
Sat Feb 02 23:48:26 CST 2008

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

"John" <John@nospam.infovis.co.uk> wrote in message
news:OtqQvfgZIHA.5900@TK2MSFTNGP02.phx.gbl...
> 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
>
>



Re: Getting connection information from vs 2008 generated code by Michel

Michel
Sun Feb 03 10:58:23 CST 2008

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

"John" <John@nospam.infovis.co.uk> schreef in bericht
news:OtqQvfgZIHA.5900@TK2MSFTNGP02.phx.gbl...
> 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
>