473,383 Members | 1,834 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,383 software developers and data experts.

Using Resources for SQL


Hi,

I am thinking that it would be a good idea to use .NET resources to
store SQL statements that would otherwise be hard-coded into an
application. I could even store them in a text file as shown in
<http://msdn.microsoft.com/library/en...nresourcesinte
xtfileformat.asp>. But I don't see any examples of using resources this
way or how to instantiate a ResourceManager from a text file, so I'm
wondering if I'm going about this the best way? Note that I'm using
WebMatrix to build an ASP.NET application so I'm not explicitly
compiling the resources into an assembly or anything.

Thank you in advance,
Marc

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 15 '05 #1
1 2216
Marc,

The first question I would ask is why you aren't using stored
procedures. This would provide a definite performance advantage.

The only benefit that you gain from having the SQL statements in a
resource file is if you have to change the statements. If you do this, you
have to assure that the result set is processed correctly, as the schema of
the result set might change.

Also, since there is only one SQL dialect for the data source you are
using (it's not like human languages, for SQL server, there is only one
language, for Access, there is only one language, etc, etc), it probably
wouldn't hurt to place them in an assembly of some sort. The resource file
does not seem well suited for this kind of thing.

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- ni**************@exisconsulting.com

"Marc Stober" <ma********@yahoo.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...

Hi,

I am thinking that it would be a good idea to use .NET resources to
store SQL statements that would otherwise be hard-coded into an
application. I could even store them in a text file as shown in
<http://msdn.microsoft.com/library/en...nresourcesinte
xtfileformat.asp>. But I don't see any examples of using resources this
way or how to instantiate a ResourceManager from a text file, so I'm
wondering if I'm going about this the best way? Note that I'm using
WebMatrix to build an ASP.NET application so I'm not explicitly
compiling the resources into an assembly or anything.

Thank you in advance,
Marc

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 15 '05 #2

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

Similar topics

0
by: Richard Taylor | last post by:
User-Agent: OSXnews 2.07 Xref: number1.nntp.dca.giganews.com comp.lang.python:437315 Hi I am trying to use py2app (http://undefined.org/python/) to package a gnome-python application...
8
by: doomx | last post by:
I'm using SQL scripts to create and alter tables in my DB I want to know if it's possible to fill the description(like in the Create table UI) using these scripts. EX: CREATE TABLE(...
16
by: Cybertof | last post by:
Hi ! I'm wondering about the use of the 'using' statement. In a procedure, should i declare all instance variables in a using clause ? In the below code, what would happen if MyFont & MyFont2...
12
by: bj7lewis | last post by:
I am working on a project I want to add a few files as resource to access(copy them to FS and use) at runtime. So far in VS.NET IDE, I Add Files to the project and set its Build Action to...
0
by: nthpixel | last post by:
Hey Folks, I am getting the following errors when I try to connect to my db with the MySqlConnection. I added MySql.Data to my Reference list and have the .dll in my bin directory. I also have...
6
by: David Veeneman | last post by:
How do I configure a .NET 2.0 SoundPlayer object to play a WAV file embedded as a resource? I have tried the example in the MSDN documentation, and I am getting nowhere. Is there a simple...
0
by: sagar.jawale | last post by:
Hi, In my c# windows application, i am using AxSHDocVw.AxWebBrowser. I am displaying a generated receipt html in this browser. Also, for printing the same html, i am using the following command...
4
by: TCook | last post by:
Hey All, I am building a solution which will have many strings that will need to be localized (i.e. strings for toolbars, strings for different WinForms, strings for messages and error messages,...
2
by: Daniel | last post by:
I am just investigating on .resx and .resource files using asp.net. I am attempting to develop a webpage in Dreamweaver on an asp.net webserver. As i read around the net, using a .resource file...
2
by: bahnfire | last post by:
Hi, I am hoping that I finally have the right group :-) I am using Visual C++ Express 2008 and am trying to change the taskbar icon that I am using (notifyIcon1) as some state changes (button...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.