473,770 Members | 2,144 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Reference to files in SQL database Web App

Hi,
I have question about techniques of using files
in SQL Server in Web Application.
Assuming that I send files from my Web App ( client )
to server and located these files on hard disk ( on server ),
I'd like to view these files and I want to have possibilities
to open it.
How can I do it ?

My only one idea is :
In table in database I should put path to specific file ?
And then I know reference to specific file connecting to
display name.
( Unless I can put files in database, not disk? I'm not good at SQL yet ,
but I doubt it )

Any others idea ? Any example in C#.

Thanks in advance.

[ ASP .NET, C#, SQL Server 2000 )

Best Regards,
grzybek
Nov 18 '05 #1
1 1342
You have several options, depending upon the specifics of your requirements.

1. Store the path the files in the database. Very efficient
2. Store the files in the database. Very inefficient
3. Don't use a database. Just use the file system. Most efficient, however,
depending upon your requirements, this could be good or bad. For example, if
all of the files in a folder were downloadable, you could simply use the
System.IO namespace to work with the file system, creating a link to each
file in a page dynamically. If, however, there are a large number of files,
and you want to be able to search on them, or some of the files in the
folder should not be downloadable, this would not be your best choice.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"grzybek" <no************ @gze.pl> wrote in message
news:bs******** **@news2.ipartn ers.pl...
Hi,
I have question about techniques of using files
in SQL Server in Web Application.
Assuming that I send files from my Web App ( client )
to server and located these files on hard disk ( on server ),
I'd like to view these files and I want to have possibilities
to open it.
How can I do it ?

My only one idea is :
In table in database I should put path to specific file ?
And then I know reference to specific file connecting to
display name.
( Unless I can put files in database, not disk? I'm not good at SQL yet , but I doubt it )

Any others idea ? Any example in C#.

Thanks in advance.

[ ASP .NET, C#, SQL Server 2000 )

Best Regards,
grzybek

Nov 18 '05 #2

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

Similar topics

2
18100
by: Peter | last post by:
Does anybody have (a link to) a reference of available SQL commands in MS-Access? I know you can use SOME VisualBasic commands, but I cannot find a reference anywhere! Among other things, I need to use an IF command, like this: SELECT IF (Field=5,"five","not five") AS NewField FROM Table I really need a reference on this! I havent been able to find anything in the Access help files, or the MSDN library. I am using ASP to access the...
2
2297
by: Kathy | last post by:
Hi All, I have several users who are getting a compile error "Can't find project or library when the code hits Dim cat as ADOX.Catalog In the references dialog box it show the msadox.dll as missing BUT it's in it's folder right where it belongs. I'v tried decompiling the database using the switch to no avail. The database runs fine on my machine. No one had any problems with it yesterday and nothing has changed.
7
1231
by: Mike | last post by:
I have developed a Microsoft Access database program. It was done originally in Access 2000. I am having trouble now installing on some other systems, particularly if they are using Access 2003/WindowsXP. It seems that the Dim statement "Dim db as database" is not recognized although I thought I was installing all the needed references. Does anyone know what library this reference is in?
7
3899
by: TJ | last post by:
In C# how do you achieve pass-by-reference property declarations in the Type Library? I am writing a COM Class Library that must mimick an existing library for which the only information is the TypeLib. I'm using Visual Studio .NET 2003. The original library provides simple authentication services, from Access and MS-SQL OLEDB providers. The enhancement I'm creating provides support for ODBC and will be a drop-in replacement.
4
399
by: Moe Sizlak | last post by:
Hi There, I have a user control that has 2 listmenus populated from a database, I want the form to submit when the listmenu are changed which seems to happen no problem when the page is on it's own but when I have it as user control I get the error "Object reference not set to an instance of an object. " what am I doing wrong? Moe <><
2
8513
by: Mark | last post by:
Hi, I'm fairly new to .NET and having problems getting an ASP.NET page working on my web host. The page works fine on my PC running against localhost. I have a MySQL database and a simple C# app with an odbcConnection object, odbcDataAdapter and a datasetCustomers object placed on the form. On page load, I fill the datasetCustomers from the "Customers" table
2
2907
by: Ben | last post by:
Hi, I need to add a reference in my project to a file (e.g. mysqldata.dll) in order to access Mysql. Using Visual Web Developer, i know how to do (menu website/add reference), but suppose i have no VWD or any tools, and that i create only one test.aspx file and another test.aspx.vb file with Notepad. How can i add a reference directly in the files in order to access Mysql? Thanks
3
2210
by: ApexData | last post by:
I know that somethimes when I make changes to the tables (like adding new fields), these changes do not always appear in the field list. If I remove the table name from the forms record source, run my code, and then replace the table name in the forms record source it finally appears. I found this soultion in the news group. This time, I changed the name of a textbox from txtMyBox to txtMYBOX. However, when I type in Me.txtMYBOX, the...
3
2943
by: shapper | last post by:
Hello, On an ASP.NET MVC project I am getting a list of Tags which names start with a string contained on the variable "q". Everything works fine if no Post is related to Tags. When there is relation I start to get a Circular Reference error. I have been trying to solve this problem for days! I can't find the reason for this, either in my SQL or C# code.
0
9618
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9454
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10260
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10038
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8933
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4007
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3609
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2850
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.