Web Forms :: Save File On DataBase Or On Directory On Server?
Apr 24, 2010
i believe That Saving Files In DataBase is good for Security Issue , But in My Scenario i didnt Care about Secrurity Issue,
i want to ask U guys which Better Save Files into DataBase or save it on Directory on Server, where This Issue Required:
1-(Reduce Load on Server and didnt affect server Memory).
2- Security not important.
if they have the same result i will move to DataBase Saving.
View 3 Replies
Similar Messages:
Jan 30, 2010
How do I upload a file on the web server and save the link of the file in a database?
View 3 Replies
Jan 4, 2014
What is the best way to insert and retrieve images like :
In the database in binary form retrieve it with imagehandler, or
In the database by saving the path of the folder of the images and retrieve it, or
by saving the images directly to the folder and retrieve it...
View 1 Replies
Jul 17, 2010
strFilePath = Directory.GetCurrentDirectory();
strFilePath = Directory.GetParent(strFilePath).ToString();
strFilePath = Directory.GetParent(strFilePath).ToString();
strFilePath = strFilePath + "\ACH" + "/ACHFile.txt";
StringBuilder sb = new StringBuilder();
StreamWriter sw = new StreamWriter(strFilePath);
if i browse for a text file and displays it in the text box and trying to save it as the name provided above i am getting the error as Directory Not Found Exception.
View 2 Replies
Dec 1, 2010
I am just learning application development and my question is so I can demo a project from an Internship for a class at school. I am planning on using Visual Studio 2010 in debug mode for the presentation.
Here it goes:
I created a database utilizing SQL server 2005. I want to take the .mdf file from SQL Server and place it in the App data directory of my application. I am hoping that I do not need to rebuild any datasets that I am currently utilizing. I am utilizing several stored procedures that are in the database, these stored procedure are access utilizing my datasets.
I was able to place the file in the application but I get an exception whenever I try to utilize a stored procedure that was created in the database.
Here is the error: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
I verified all of my datasets utilize the following connection:
<add name="DerrickConnectionString" connectionString="Data Source=.SQLEXPRESS;AttachDbFilename="|DataDirectory|Derrick.mdf";Integrated Security=True; Connect Timeout=30;User Instance=True "
providerName="System.Data.SqlClient" />
Get methods that I built with the query builder in VS work but stored procedures do not.
View 4 Replies
Jan 7, 2010
is there an equivalent code to show the save as dialog on server side rather on client side (Response.AddHeader)?
I need to provide the same functionality as Response.AddHeader to show the save as dialog but instead of browsing the client, I need to browse the server side directory.
View 7 Replies
Nov 25, 2010
I am really stumped on this. I have IIS setup on my local box, and a virtual directory pointed to the folder MapBuilder. IUSR and IWAM have been given full access. When I run this through web developer, everything works great. When I access it through IIS, the following error is generated:
[Code]....
The line of code that generates the error is:
[Code]....
If I change the code to use a virtual directory I get the same basic error on the Overview.Save call:
[Code]....
View 2 Replies
Sep 26, 2013
This codes below create sub-directory, upload images, save in to database but images save in main directory (which is Albums). My concern is I want to save it into sub-directory that images uploaded..
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Upload Image</title>
</head>
<body>
<form id="form1" runat="server">
[CODE]..
View 1 Replies
Nov 23, 2010
A friend of mine gave me this task so I can learn advance programming a little bit easier. I am currently doing convertion of an html page to pdf using itext sharp and email the pdf as an attachement. My idea is to save the pdf first to the server machine in the folder name ToBeEmailedPDF folder before using it as an email attachment. The thing that bothers me is that this dialog as what you can see in the picture shows up using the code that I have below.
[code]....
View 2 Replies
May 7, 2015
I have 1 fileupload control that I can upload file from it below is code :
int count = 0;
if (this.fuppdf.HasFile && !string.IsNullOrEmpty(this.txtarticle.Text))
{
string[] validext = { ".pdf" };
//string ext = System.IO.Path.GetExtension(fuppdf.PostedFile.FileName);
string ext = Path.GetExtension(fuppdf.PostedFile.FileName);
[code].....
and with below code I want save filename (uploaded filename) in database
SqlCommand _cmd = new SqlCommand("Fileuppdf", _cn);
_cmd.CommandType = CommandType.StoredProcedure;
string data = Session["behcode"].ToString();
_cn.Open();
_cmd.Parameters.AddWithValue("@pdf", filename);
_cmd.Parameters.AddWithValue("@Behcode", data);
_cmd.Parameters.AddWithValue("@id", Convert.ToInt32(ViewState["Id"]));
but it make error in this line
_cmd.Parameters.AddWithValue("@pdf", filename);
error===>("The name 'filename' doesn't exist in the current context")
I know that I define filename in
foreach (string s in files)but I don't know how I can save it name in database
View 1 Replies
May 7, 2015
I want example upload pdf file and send name, title, filename, filepath to database and retrieve and display pdf from Upload Folder...
View 1 Replies
Aug 7, 2012
I have seen in your's Save and Retrieve Files from SQL Server Database using ASP.Net
there it is accepting only specific file but i want it should take all type of files. and store it in the database.
View 1 Replies
Mar 17, 2011
actually my need is that, after uploading a doc file I want to save this doc file's text to database table, with the help of asp fileupload control. actually in real I dont want to save this whole file anywhere, but I just need the text to save in databse.
View 2 Replies
Feb 8, 2011
how to upload and save files to oracle database, and view file using C# .net and can upload one or more files in one webform.
View 1 Replies
Mar 26, 2016
How to verify certificate from local image folder not from database
My design code is
<table style="width: 50%; border:none">
<tr>
<td>Enter Certifice No:</td>
<td>
<asp:TextBox ID="txtCertificeNo" runat="server"></asp:TextBox></td>
[Code] ....
And now I want search result using certificate no as image file name from image folder .
View 1 Replies
Dec 2, 2011
I want to save binary information like images, files ,etc to SQL server database.
View 1 Replies
Dec 8, 2011
I want to insert multiple rows of data from a gridview to database table in a single button click event.
View 1 Replies
Sep 5, 2010
I have a file on the server that users will have the possibility to download to thieir computer. For example the filepath could look like below. How would it be possible to save this to the desktop or C: etc.. ?
[Code]....
View 3 Replies
Mar 19, 2010
What I am doing seems to be saving the Excel file in a text format. All I am trying to do is save the Excel file (xls) on my web server. Below is the code that "fetches" it now but doesn't save it in the proper format.
[Code]....
View 1 Replies
Apr 13, 2010
i have get the piece of code from www.aspsbippets.com
protected void ExportToWord(object sender, EventArgs e)
{
//Get the data from database into datatable
string strQuery = "select CustomerID, ContactName, City, PostalCode" +
" from customers";
SqlCommand cmd = new SqlCommand(strQuery);
DataTable dt = GetData(cmd);
//Create a dummy GridView
GridView GridView1 = new GridView();
GridView1.AllowPaging = false;
GridView1.DataSource = dt;
GridView1.DataBind();
Response.Clear();
Response.Buffer = true;
Response.AddHeader("content-disposition",
"attachment;filename=DataTable.doc");
Response.Charset = "";
Response.ContentType = "application/vnd.ms-word ";
StringWriter sw = new StringWriter();
HtmlTextWriter hw = new HtmlTextWriter(sw);
GridView1.RenderControl(hw);
Response.Output.Write(sw.ToString());
Response.Flush();
Response.End();
}
this code create word documnet and automatically downloaded to visitor machine, how i can save it on server rather than visitor machine?
View 2 Replies
Jun 14, 2010
I have been debating back and forth between using a database or the file server to store images for users. Finally when I decided to use the file server I found it difficult. What I am trying to do is give a user the option to save multiple profile pictures. I have looked all over for tutorials on how to save to the file server but could find nothing related. Essentially what I would like to do is create folders for each user and their images. I am having no luck. Does anyone have example code or links to what I am looking for?
View 3 Replies
Jan 19, 2011
I'm trying to write code that will allow a user to click a button and be prompted to save an image file that resides on the web server. I'm using the following code, but I get an error that says "Error: Could not complete the operation due to error c00ce514.".
[Code]....
I have verified that the file exists. Is there another method for prompting users to save a file to their local machine?
View 3 Replies
Feb 15, 2010
Is that a way to edit excel file on browser and then save it on server?
View 5 Replies
Sep 24, 2012
how to store mp3 files in database(sql server) and how to retrieve those stored songs and play in a page
View 1 Replies
Jan 14, 2011
i have visual studio 2005, asp.net c#.
i want to store the uploaded files to database.
if possible tell me how to get the file properties of the uploaded files such as file name, file created date and file extension.
View 2 Replies