locked
how to know the connection string for crystal report? RRS feed

  • Question

  • hi all,

    i want good suggestion

    i am developing an application that is lan based 

    i.e database(sql server) will stored in main system and clients will in tract the server with c# windows application.

    in my application i have 20 forms

    i was created database connection class and in that class i created method for connection open

    and i am calling the open method in each and every form load

    is it correct to call the open method at form load?

    is this process will degrade the connection process ?

    and i am using crystal reports i created crystal reports at design time using design wizard 

    in design wizard of crystal reports i established connection to sql server

    can i assign my connection string to the crystal report?

    i searched connection string for my reports but i am unable to find where the connection is created..

    can anyone please tell me how to set my connection string to crystal reports?

    Thanks,

    Murali.


    programmer on .net

    Sunday, April 14, 2013 7:29 PM

Answers

  • Hi Murali,

    Your post contains more than one question, so I will only answer the ones I know anything about:

    and i am calling the open method in each and every form load

    is it correct to call the open method at form load?

    is this process will degrade the connection process ?

    Normally, you shouldn't have to care about opening connections. Also, because of connection pooling, your calls to Open and Close do not actually open and close connections, instead they retrieve and release connections from/to the pool.

    Unless you have a good reason to keep the explicit Open calls in your code, I would suggest you remove them and let the framework handle it for you.


    Marcus Björklund

    Please use "Mark As Answer" if my post has answered your question, and/or vote for it if you find it helpful. Thanks!

    Sunday, April 14, 2013 7:48 PM