473,396 Members | 1,877 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

server control with lots of database interaction

Seb
I want to develop a server control which query a database several
times. The thing is I cant just include the result of a linq query as
a datasource since I need to query several times and work on the
results... and perhaps query some more.
Should I include a reference to my datacontext class?

I also want it to act a bit like asp:Login in the sense that it
creates a database if one isn't present or create the need tables if
one is.

Can someone point me in the right direct either by some hints or by a
url?

best regards,
seb
Jul 11 '08 #1
2 1016
You shouldn't couple your control to the database. You should call into some
business layer instead. Let the business layer call into the database that
way you don't implement a brittle control that falls over dead when the
database schema changes etc.

--

Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Download OWC Black Book, 2nd Edition
Exclusively on www.lulu.com/owc $15.00
Need a free copy of VSTS 2008 w/ MSDN Premium?
http://msmvps.com/blogs/alvin/Default.aspx
-------------------------------------------------------
"Seb" <se******************@gmail.comwrote in message
news:42**********************************@t54g2000 hsg.googlegroups.com...
I want to develop a server control which query a database several
times. The thing is I cant just include the result of a linq query as
a datasource since I need to query several times and work on the
results... and perhaps query some more.
Should I include a reference to my datacontext class?

I also want it to act a bit like asp:Login in the sense that it
creates a database if one isn't present or create the need tables if
one is.

Can someone point me in the right direct either by some hints or by a
url?

best regards,
seb
Jul 13 '08 #2
Seb
On 13 Jul., 18:13, "Alvin Bruney [ASP.NET MVP]" <vapor dan using hot
male spam filterwrote:
You shouldn't couple your control to the database. You should call into some
business layer instead. Let the business layer call into the database that
way you don't implement a brittle control that falls over dead when the
database schema changes etc.
Makes sense, thanks for the info.
Jul 13 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Lorax | last post by:
I'm on the IS team of a medium-sized non-profit with international reach. We're trying to make some decisions regarding our Web server and database server as we expand our web site to have more...
2
by: J.Beaulieu | last post by:
Hi I'll have probably to use sql server soon but prior to that I have a question concerning priviledges and security. Is it possible for someone to do like in access, ie creating a db/table...
7
by: rdh | last post by:
Hi all, I am in process of developing a Server in C++ supporting multiple protocols. The server will be exposing various functionalities, and the clients can communicate over any of the...
10
by: Andy K | last post by:
Hi again , I've been trying to connect to a distant database with my control center on WinXp . I'm using a personnal edition DB2 v8.1.9.700 for the control center on WinXp. I've setup a...
19
by: trint | last post by:
Ok, I start my thread job: Thread t = new Thread(new ThreadStart(invoicePrintingLongRunningCodeThread)); t.IsBackground = true; t.Start(); There are lots of calls to controls and many...
1
by: Al | last post by:
hi, I am new to asp.net. I have a question about Marshelling b/w client browser and web server(database). I heared that it is better to minimize going back and forth b/w client browser and the...
7
by: Wayne Taylor | last post by:
Hello All I have built an ASP.NET web application using VS2003 and v1.1 of the framework. On my development system, Windows XP SP1a, all works well. When I transfer the application to Windows...
11
by: Bob | last post by:
I am in the process of upgrading an Access database to SQL Server (and climbing that learning curve!). The wizard happily upgraded all the tables and I can link to them OK using ODBC. The...
0
Dököll
by: Dököll | last post by:
ASP.NET and SQL Server 2005 Database interaction includes: Language: ASP.NET Connectivity: SQL Server 2005 Foreword: This database connectivity is nothing of genius, it is a simple...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.