Re: reuse connection object with diff username passwor ...
- From: jtbm
- Date: Thu, 23 Nov 2006 18:40:51 -0800
Yes this is a 'thick' winforms client. Well I went ahead and restructured my app to create a new connection object instance everytime I need a username change, rather then trying to reuse an existing connection object by changing its connectionstring. Things are working good now.
But this is just one more case that makes ado.net designers/design time development useless. I have decided to remove my connection completely from designer and create it in code now. I already had a problem where once ConnectionString is set in InitializeComponent() any following code that assigns the connection to a command object initiates database communications... and you have no control over this because it depends on serialization order of designer generated code!! HELLO!@# dont talk to the database until i ask for it **** it!!#
...I have several other issues with ado.net designers too. I wish I had done everything in code right from the beginning. Seriously is anyone able to use these in a real project? I just use them in a separate dummy project to generate code, then I copy and paste the code. I can see being able to use them for simple asp.net stuff I guess.
---
Posted via DotNetSlackers.com
.
- Follow-Ups:
- Re: reuse connection object with diff username passwor ...
- From: Miha Markic [MVP C#]
- Re: reuse connection object with diff username passwor ...
- From: Miha Markic [MVP C#]
- Re: reuse connection object with diff username passwor ...
- From: William \(Bill\) Vaughn
- Re: reuse connection object with diff username passwor ...
- References:
- Prev by Date: Re: [Datagrid Onclick Error]
- Next by Date: Re: reuse connection object with diff username passwor ...
- Previous by thread: Re: reuse connection object with diff username password?
- Next by thread: Re: reuse connection object with diff username passwor ...
- Index(es):