.Net Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - More.Net Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old August 22nd, 2003, 03:04 PM
bb612 bb612 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 1 bb612 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
OleDbDataReader, I just want an empty one

sounds strange, i want to create an empty OleDbDataReader, but the contructors are private, so ... i can't

why would i want to do this? well, i'm working on a large application and i'm charged with making the interface smooth. the problem is that the low-level programmers created many (many) controls that make up the app. Many of the controls make calls to the database in their constructors, so in design-mode i open a control, or form, and those constructors get called, but the db is not available at design time so an exception is thrown, and all i see is that error message, and not the interface editor of the the control/form. making it difficult to beautify.

my solution was to deflect database calls at the source, go to the db layer interface and if it's in design-mode (i have flags that indicate this) just return "data" that the controls want to see, to make them shut up so i can operate. basically, so the Open()'s return true and ExecuteQuery()'s return ... an EMPTY OleDbDataReader (but i can't) kind of just assuage the controls into thinking they're talking to a database when they're not.

going into each control and wrapping a if(!base.DesignMode){} block around the unsafe stuff would be ideal, but also time consuming, this was supposed to be a quick fix (and you know how those usually work out..)

ideas? thanks!

--
Brian
Comments on this post
Gran Roguismo agrees!

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - More.Net Development > OleDbDataReader, I just want an empty one


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT