SQL Server :: Storing PDF Into SQL Or Alternatives?
Dec 10, 2010
title isn't as detailed as I hoped but I have a few questions. Traditionally I've always been a mixed mode person, storing PDFs and other things into the file system with pointers from my SQL DB to them.
Recently I've heard more people storing files into the DB directly and wonder if I'm storing files around 100-200MB in size, will I run into a lot of issues? Are there ways to compress the files other than perhaps zipping them up and storing the zip?
Finally, something I've always wondered about but never really found a good work around for... if I decided to continue with the mixed-mode storage solution, and these I need to retrieve these files for use on a website, how do I secure these files so that someone can't just randomly come and retrieve these files off the server by guessing files names, etc?
I did one work around once where I stored a set of PDFs to a non-web directory like c:pdf and setting permissions for the web account to access them. This allowed me to retrieve them using the references in the DB and provide some garbled filename so people couldn't retrieve it themselves but this all seems rather complicated.
View 1 Replies
Similar Messages:
Jan 24, 2011
I have a multiple database operation, Have three tables (MSsql) and need to delete one row in each table in one operation, one after another. (Three functions, three rows of code). Everything is working as it should be, recently I was advised to use a transaction scope, which should guarantee the safety of deletion from all 3 tables together.
Here is my new code:
[Code]....
Locally all worked just fine, the transaction scope worked well, but when I have uploaded my application to my hosting server, I got an error of: The partner transaction manager has disabled its support for remote/network transactions. (Exception from HRESULT: 0x8004D025).I talked with the host support, they tried to do something, then I got this error: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)).
After a 2 days, They have contacted me, they said it is not possible to disable some restriction, that will allow an access to this operation, because I'm using shared hosting, and I need to upgrade my plan to VPS. VPS is a very expensive for me, and I can't afford it, What I'm looking is a some similar way of doing the same operation as transaction scope do, that may work at my hosting, At least I would like to try something else. Is there any additional way for the transaction scope?
View 1 Replies
Jun 22, 2010
I'm looking at options for rendering PDFs on the server to avoid the user having to download them (they're big docs) and/or have a PDF reader installed and configured (audience is not tech savvy). The Google Viewer and Scribd are nice examples, but I'm not interested in making the PDFs available on the web (for Google) or storing them on another party's servers (Scribd).
My favorites right now are FlexPaper and PDFWebViewer.NET but I wanted to see if I'm missing any other options. Most of the related SO questions on this topic are somewhat dated, so maybe there's something new?
Any other options to check out?
View 7 Replies
Apr 20, 2010
I am building UI for a large product catalog (millions of products).
I am using Sql Server, FreeText search and ASP.NET MVC.
Tables are normalized and indexed. Most queries take less then a second to return.
The issue is this. Let's say user does the search by keyword. On search results page I need to display/query for:
Display 20 matching products on first page(paged, sorted)
Total count of matching products for paging
List of stores only of all matching products
List of brands only of all matching products
List of colors only of all matching products
Each query takes about .5 to 1 seconds. Altogether it is like 5 seconds.
I would like to get the whole page to load under 1 second. There are several approaches:
Optimize queries even more. I already spent a lot of time on this one, so not sure it can be pushed further.Load products first, then load the rest of the information using AJAX. More like a workaround. Will need to revise UI.Re-organize data to be more Report friendly. Already aggregated a lot of fields.
I checked out several similar sites. For ex. [URL]. Not only they display the same information as I would like in under 1 second, but they also include statistics (number of results in each category).
The following is the search for keyword "white" [URL] How do sites like zappos, amazon make their results, filters and stats appear almost instantly?
View 3 Replies
May 5, 2010
I've got an ASP.NET 3.5 Web Forms application in which a large chunk of code needs to be duplicated between a few different pages. Sounds like the ideal candidate for a user-control right? Problem is, this cannot be contained within a <form runat="server"> because it contains a client-side form of it's own. There are no runat=server controls or postbacks or anything that really need that webform - think of it just as a chunk of HTML with a few basic <% %> tags. I'd just want to set a property on the control when it's loaded, so that it knows what to output. This is purely an exercise to make the code easier to maintain.Before I resort to using an oldskool <!--#include-->, is there some better way of doing this?
View 5 Replies
May 11, 2010
I have a File Uploader in my ASP.NET application Using C#, we can upload any type like images, documents, pdf etc.
I m storing it in the Filesystem and having only the Name of the File in DB.My doubt is can we store the entire file, images in DB. State me Which is good practice and why we need to use it.
Either file System Storage or SQL DB Storage.
View 4 Replies
Aug 16, 2010
Have a question about the best approach for file storage in a SQL database. I have a table called Widgets, and each row in the Widgets table can have multiple files. I also have another table called Extensions, and again each record in this table can have many files.
Here is what I am considering:
Approach #1:
[Code]....
That approach is very simple and easy to use, but I feel that I could merge the two file tables into one, then use lookup tables:
Approach #2:
[Code]....
The thing is, there are no duplicate or shared files between the two types of objects. So even though I feel better about approach #2, I am concerned that I may be adding additional complexity (and using more server resources to perform the joins), than needed.
View 1 Replies
Oct 1, 2010
I'm using Cute Editor for ASP.NET for the first time, and it's occasionally refusing to insert or update a record. Basically the records are just composed of a bunch of HTML and text. So far I can't detect a pattern to the problem and I'm wondering about my data type.
I tried VARCHAR(MAX), NVARCHAR(MAX), and NTEXT, doesn't seem to fix it.
So what is the best SQL data type for HTML?
And could that be causing CuteEditor to refuse to insert/update records? Or something else?
View 10 Replies
Mar 23, 2010
How can I store a word document using an upload control in sql server? Also is there a better way to store a word document without using an upload control
View 7 Replies
Jan 15, 2010
I am designing an prototyping an app the needs to store images, similar to facebook. This will be a public facing site and I am not sure how many users I will end up with but what I am looking for is a way to efficiently retrieve them.
So far I am thinking of storing them in SQL Server varbinary columns. I have the upload code and the storage code for that. My concern is retrieving them. I can retireve and build the image tag on the fly but I am worried about having to hit the database for each one.
I have been thinking about getting all images for a user and caching them in the asp.net cache for 10 to 30 seconds. I have never had to do something like this so I would be interested in hearing a few different approaches. Obviously the images can vary in size and I was thinking about defining a size limit, but I haven't gotten that far yet.
View 3 Replies
Sep 20, 2010
I want to store IP number in a column in db but which column type should I use? Of course I can use string but isn't this a waste of storage space? Can I not store IP nr in another type in db that saves space?
View 1 Replies
Aug 14, 2010
i am reading image from database (sql server) by using handler and getting it in memory stream. now i want to store that image on server in the folder named Images.
View 2 Replies
Feb 27, 2010
I have to find a design decision for the following task: I have a SQL Server database and it contains a table of orders. PDF documents will be uploaded by users through a simple file upload from a web page and assigned to an order. There is not more than one document per order (perhaps no document, never more than one). For this purpose a user opens a web page, enters an order number, gets the order displayed and clicks on an upload button. So I know to which order the uploaded document belongs to.
Now I am considering two options to store the documents on the web server:
1) Extend my table of orders by a varbinary(MAX) column and store the PDF document directly into that binary field.
2) Save the PDF file in a specific folder on disk and give it a unique name related to the order (for instance my order number which is a primary key in the database, or a GUID which I could store in an additional column of the order table). Perhaps I have to store the files in subfolders, one per month, and store the subfolder name into the order row in the database, to avoid getting too many thousand files in one folder.
After the PDF files are stored they can be downloaded and viewed via browser after entering the related order number.
I'm tending towards option (1) because the data management seems easier to me having all relevant data in one database. But I am a bit afraid that I could encounter performance issues over time since my database size will grow much faster than with solution (2). Around 90% or even 95% of the total database size would be made up only by those stored PDF files.
Here is some additional information:
The PDF files will have a size of around 100 Kilobyte each
Around 1500 orders/PDF files per month
Windows Server 2008 R2 / IIS 7.5
SQL Server 2008 SP1 Express
Not quite sure about the hardware, I believe one QuadCore Proc. and 4 GB RAM
Application is written in ASP.NET Webforms 3.5 SP1
(I am aware that I will reach the 4GB-limit of the SQL Server Express edition after around 2 years with the numbers above. But we can disregard this here, either removing old data from the database or upgrading to a full license will be a possible option.)
My question is: What are the Pro and Contras of the options and what would you recommend? Perhaps someone had a similar task and can report about his experience.
View 5 Replies
Jul 14, 2010
I have created file upload funactionality along with progress bar in my project for this. I have referred following jquery tool you can see here.[URL]with the respective funcationality. i have created one .ashx file for string file on server but when i try to store file on server it gives me error.Could not find a part of the path so i put whole path in the respective code but still i m getting some error. my code is
sfilenamestored = ("\Users\dev5\Desktop\DataAccessLayer\PresentationLayer\"+"/Uploaded_Document/" + upload_files.foldername.ToString()) + "/" + GetUniqueKey() + file.FileName;
View 2 Replies
Nov 29, 2010
i made an asp page for registration with the following fields name, address etc. i also created database in sql server. how to save these field data in my database.
View 2 Replies
Jan 22, 2011
I have a list of points and I want to make a line from them.
I found one example for using STLineFromText but it is for concrete values. For example:
[Code]....
Now how can I iterate through all the points I have and form a line, so I don't want to write exact values like -122.360 47.656 but to take them from the list?
View 5 Replies
Mar 19, 2011
WEB FRAMEWORK: ASP.NET in C#
I've looked all over the web for something that would show me how to do this but can't find it. I have a page that uploads information about an individual including a resume in the form of a doc docx or pdf. I can upload the file okay but I do not know how to, on another page, To download the file that was loaded to that person's row in the database. Here is the upload code
[code]....
View 1 Replies
Aug 10, 2010
I've got a table where i'm storing a CheckBox.Checked value.
I'm using C# and the value of the field in the table im writing to is a bit.
myDS.InsertParameters["p1"].DefaultValue = CheckBox1.Checked.ToString();
The value placed in my table ends up being either "True" or "False".
So when I try to query the table based on that value with a stored procedure it doesn't work since its looking for a 1 or a 0.
I think the .ToString() is part of the problem but i don't know the syntax to have the value from the CheckBox.Checked to be written as 1s or 0s instead of true or false.
View 1 Replies
Jun 3, 2010
get the list of all sessionid which will be running onto server without storing them anywhere.
View 7 Replies
Feb 4, 2010
One my web application uses barcodes.... When i add a new item i am generating a barcode value which is converted to a barcode image... My question
What would you suggest storing barcode values or barcode images in sql server 2005?
EDIT:
What Type of barcode you would suggest using with an asp.net application?
Linear Barcode (Code 128) is my choice..
View 3 Replies
May 19, 2010
How to store currency symbol in the sql server.
View 1 Replies
Apr 10, 2010
I am trying to build a small e-commerce website that will allow user to upload and store the image of their product in the database and also the user could upload the image of the product and compare it with all the similar product images that are already stored in the database. I am using MS ASP.Net using VB.Net as the front end.
if MS SQL server is the best option to carry out such task or should I consider some other database to do this in terms of complexity involved as well as the integration with MS .Net framework.
View 1 Replies
Jan 8, 2010
I am working on document management system. finding guide / code for Storing and Retrieving doc/pdf/xls files in SQL Server 2005.
View 1 Replies
Nov 25, 2010
i m using sql server 2005 and asp.net 2.0.
i want to store text data with paragraphs as it is in sql server and retrive it .
want to show that data with paragraphs in .net again.
View 2 Replies
Feb 18, 2010
I am storing image (jpeg) files into SQL server 2005 using MS Access Forms. When I try to read and render it on a webpage using ASP.net and C# code behind, it could not read it.
But if I write the image to SQL server using ASP.NET C# and then read it back using ASP.NET C#, it render the image just fine in the browser.
Does anyone know if Access write the blob is difference than ASP.NET write the blob into SQL server? I am using the same varbinary as my column in the database.
View 3 Replies