Re: reuse connection object with diff username passwor ...
- From: "William \(Bill\) Vaughn" <billvaRemoveThis@xxxxxxxxxx>
- Date: Thu, 23 Nov 2006 19:58:10 -0800
See >>>
--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
-----------------------------------------------------------------------------------------------------------------------
<jtbm> wrote in message news:e$q11H3DHHA.4404@xxxxxxxxxxxxxxxxxxxxxxx
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.
Good...
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.
I have to agree. These are the same conclusions I came to in my new
book. The data access code is not that hard to write--especially if you
can leverage it over time. You'll find that the Windows Forms
application is having a comeback. I've also found that the Visual Studio
code generators (there aren't any in ADO.NET), are okay for the
simpliest of applications. You'll quickly outgrow them with more
sophisticated designs.
---
Posted via DotNetSlackers.com
.
- References:
- Prev by Date: Re: reuse connection object with diff username passwor ...
- Next by Date: Re: reuse connection object with diff username password?
- Previous by thread: Re: reuse connection object with diff username passwor ...
- Next by thread: Re: reuse connection object with diff username passwor ...
- Index(es):
Relevant Pages
|