Tracking Forums, Newsgroups, Maling Lists
Home Submit Tracker Forums
  Advanced Search


SQL Server :: Save And Retrieve A Document From A System With Its Path Stored In Db?

How can i retrieve a document saved in system folder whose path is stored in sql db...

View 3 Replies (Posted: Feb 10, 2011 04:08 AM)

Sponsored Links:

Related Forum Messages For ASP.NET category:
Forms Data Controls :: Save Image Path Into Database / Retrieve Image Path By Particular Image ID
Currently, I have a file upload control in my aspx page to allow user to upload images.

When the user clicks the SAVE button, the image will be saved in a particular folder named 'PMap' that located within the website.

What I am trying to do here is to direct all uploaded images into a common image folder (in this case 'PMap') and then, retrieve the images and displayed it through a Gridview according to its respective image id. I have managed to store all uploaded images into a common image folder, PMap.

However, I hope advice can be given on my following problems...

My problems are:

1) How do I save the physical path of the image in that particular folder into the database under a column named ImgPath, so that I can 'call' and retrieve the image from the folder using ImgPath?

2) How do I ensure that when I retrieve the image from the folder, it's the image of that particular Image ID?

This is my current VB codings:


Posted: Dec 19, 2007 02:30 AM

View 11 Replies!   View Related
ADO.NET :: Retrieve Document From Sql Server?
I am using ASP.NET 2.0 and C#. I am storing a word document in sql server 2005.

I am storing usingthe below code:


I am able to store thedocument, I would like to retrievethe saved document.How to retrieve the word document from database?

Posted: Jul 22, 2010 09:42 AM

View 3 Replies!   View Related
Insert & Retrieve Uploaded Document Using Fileupload Into Sql Server?
How to insert & retreive an uploaded document using fileupload into sqlserver. I am practicing on a job portal website. Jobseeker uses fileupload to upload his/her resume. and when uses preview resume. the resume should be displayed here only when uses preview resume command.

Posted: Feb 05, 2009 05:30 AM

View 8 Replies!   View Related
Web Forms :: Retrieve Word Document From Sql Server 2005?
Currently I am retrieving a word document from sql server which is stored as varbinary datatype.

My problem is I am unable to convert it into string.

The code I am using is as follows..

btYourDoc = ((byte[])dr["MyDoc"]);
context.Response.ContentType = "ms-word";

I am able to retrieve the doc, but its is binary format.

Posted: Aug 24, 2009 06:45 AM

View 1 Replies!   View Related
Web Forms :: How To Store And Retrieve Ms Word Document In Sql Server 2000
iam using with c# with back end as sql server 2000 i want to store and retreive ms word document 2003 or 2007 using with c#...

Posted: Jul 01, 2010 08:57 AM

View 1 Replies!   View Related
Web Forms :: Save Word Document Retrieved From SQL Server?
Now I canupload image/Word document and store itin toour SQL database.

Also I can save image retrieved fromour SQL database.

But Iam having problem with retrieving Word document.

Right now I am doing this for word document:


This works, but IT ONLY shows in the browser. (I WANT TO SAVE THIS AS .DOC IN ONE OF OUR FOLDER)

For images (*.jpg *.gif) I can save it in our folder. Like this:


This saves as temp.jpg in our Temp folder.

I want to do exactly the same with word document.

But I cannot use Bitmap as image. It gives me error...

Posted: Jan 04, 2011 07:58 PM

View 5 Replies!   View Related
Can Upload And Retrieve The Path In Ftp Server Using C#
how can i upload and retrieve the path in ftp server using in c#...

Posted: Dec 12, 2008 05:13 AM

View 3 Replies!   View Related
How To Save The Created Word Document On Database, Or On Server Folder
I am Generating a Word Document by using Following Code:

StringBuilder str1HTMLContent = new StringBuilder();
str1HTMLContent.Append("<body>".ToString()); [code]....

The word file is Created and popup on windows .How can i save this created word Document on Database, or on server folder?

Posted: Feb 14, 2011 02:47 PM

View 2 Replies!   View Related
How To Open Word Document 2007 And Save Format As .xps At Server Side
How to open word document 2007 and save formate as .xps at server side.

I want the user to open word docx at server side user will click the button to open document which will be execute at server side. I want to show to my client a xps formate of docx which will be converted at server side(from .docx to .xps).

My code is running on local correctly. but at iis5.1 it's not working & giving an exception :-

System.UnauthorizedAccessException: Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 80070005.

ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}ASPNET on IIS 5 or Network Service on IIS 6) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate="true"/>, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.

To grant ASP.NET access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access.


Posted: Nov 03, 2010 06:35 PM

View 1 Replies!   View Related
C# - How To Download Word Document Stored In Database As Content Data In Sql Server
How to download a word document which is stored in database, sql server as a content data through C#? This is my Code I'm using:

string doctype = dtResumeInfo.Rows[0]["ContentType"].ToString();
string docname = dtResumeInfo.Rows[0]["FileName"].ToString();

But, it is showing the following error:SubStatusCode 'Response.SubStatusCode' threw an exception of type 'System.PlatformNotSupportedException'
base {"This operation requires IIS integrated pipeline mode."} System.NotSupportedException {System.PlatformNotSupportedException}
Headers 'Response.Headers' threw an exception of type 'System.PlatformNotSupportedException'

My IIS version is 6.0 where I published. Donwloading word document can be done only in IIS 7. So, this is the cause of the error. Is there any other way to overcome this problem? Any other code will support lower version??

Posted: Jan 4 10 at 12:13

View 2 Replies!   View Related
DataSource Controls :: Retrieve A Word File From Server Map Path?
I am following this article[URL]

The code from the article is:


Aftercommenting thelines in bold..I can upload word files too...The article also has

GenerateBrochureLink method...which generates link..but when i click the link to download my word file.i get some zip file...with xml.

How can i download theword file which i have uploadedwith the view brochure link in gridview.

Posted: Jan 27, 2010 09:01 PM

View 19 Replies!   View Related
SQL Server :: How To Save And Retrieve Arabic Data In SQL2005
I have my field type nvarchar(50) and also save my aspx file with unicode with/ (without) signature?But still I am getting the return value ????? and saving also in database by ?????

I am usin SQL 2005 2008 and also using some AJAX Controls in my file Like Clander I can Save and Retrive the Arabic DAta from my Entry Page?

Posted: Feb 12, 2011 09:04 AM

View 5 Replies!   View Related
SQL Server :: Retrieve A Column Present In One Stored Procedure Into Another?
Actually i'm doing a project on quiz..i created a questions table with fields qno,qdesc,a,b,c,d,answer....then i wrote a store proc to retrieve qno,qdesc,a,b,c,d randomly.SELECT top 5 Q_No,Q_Desc,A_Opt,B_Opt,C_Opt,D_Opt,answers from [dbo].Questions randomrows ORDER BY NEWID() and another store proc to retrieve answers randomly. SELECT top 5 answerst from [dbo].[Questions] randomrows

but finally i'm getting 1st store proc n 2nd store proc randomly...But the answers related to that particular qstn r not matching. how canwe retrieve a column present in one stored procedure into another stored procedure

Posted: Jul 14, 2010 07:58 AM

View 2 Replies!   View Related
SQL Server :: How To Pass The File Path In EXEC Of Stored Proc For Getting IIS Logfile Data
I need to get IIS Logfile data from Stored Proc. How to do this. I am using Bulk Insert Method in my stored Proc When I execute the stored proc I am getting an error that


Posted: Sep 03, 2010 05:42 AM

View 5 Replies!   View Related
DataSource Controls :: Retrieve Values From A Temp Table In SQL Server Stored Procedure
I have three tables.... say A,B,C.From table A, i am retrieving ID and name by passing SubID(this is a parameter for whole query). I am inserting these values into a temp table and using a while loop because by passing each ID(nothingbut valueretrieved) of temp table I need some data fromTables B and C. For one particular ID of temp table, I need all records from table B and C.The prob here is the data in temp table does not get deleted and I am getting same data what ever my SubID may be passed fro the SP. And also,if there are many records matching ID(in temp rspGetRegistrationLiabilities]

Posted: Nov 18, 2009 07:14 AM

View 6 Replies!   View Related
Forms Data Controls :: Display Images In DataList Control Using The Path Stored In SQL Server Database
I tried to Display Images in DataList Control using the path stored in SQL Server database. The images stored in the separate foldercalled "NewsImages"& I store the image path in the Database. I use the DataSet to write the query, it's simple query: SELECT * FROMNews (Table Name)

I drag the image control in the DataList & binde the ImageUrl to the Image Path. The problem when I view the Page in the browser the images doesn't display I don't know why All the other inofmation like the News Title, News Content, News Date display. Here is the code:

<asp:DataList ID="DataList1" runat="server" DataKeyField="NewsID" DataSourceID="ObjectDataSource1">
<td rowspan="2" style="width: 100px">
<asp:Image ID="Image1" runat="server"
ImageUrl='<%# Eval("NewsImagePath") %>' /></td>
<td style="width: 100px">
<asp:Label ID="NewsDateLabel" runat="server" Text='<%# Eval("NewsDate", "{0:d}") %>' Font-Names="Verdana" Font-Size="10pt" ForeColor="#292C90"></asp:Label></td>
<td style="width: 100px">
<asp:Label ID="NewsTitleLabel" runat="server" Text='<%# Eval("NewsTitle") %>' Font-Names="Verdana" Font-Size="10pt" ForeColor="#292C90"></asp:Label></td>
</asp:DataList><asp:ObjectDataSource ID="ObjectDataSource1" runat="server" DeleteMethod="Delete"
InsertMethod="Insert" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData"
TypeName="DataSet1TableAdapters.NewsTableAdapter" UpdateMethod="Update">
<asp:Parameter Name="Original_NewsID" Type="Int32" />
<asp:Parameter Name="NewsTitle" Type="String" />
<asp:Parameter Name="NewsContent" Type="String" />
<asp:Parameter Name="NewsDate" Type="DateTime" />
<asp:Parameter Name="NewsImagePath" Type="String" />
<asp:Parameter Name="Original_NewsID" Type="Int32" />
<asp:Parameter Name="NewsTitle" Type="String" />
<asp:Parameter Name="NewsContent" Type="String" />
<asp:Parameter Name="NewsDate" Type="DateTime" />
<asp:Parameter Name="NewsImagePath" Type="String" />

Posted: Nov 26, 2009 05:08 PM

View 13 Replies!   View Related
Localization :: Save Data From Mobile To Server Datetime Is Not Stored Correctly?
I am working on windows mobile and using webservice to store data on server. When Isave data from mobile to server Datetimeis not stored correctly on server as it should be.Datetime has been changed to Server Datetime which is wrong. I want that it should save that date which i have passed fromWindows Mobile.

Posted: Jan 25, 2010 12:19 PM

View 1 Replies!   View Related
Modify The Temporary Folder Path Returned By System.IO.Path.GetTempPath() Method?
Exsits any way to modify the temporary folder path returned by System.IO.Path.GetTempPath() method?

My application run under iis 7.

Posted: Jul 21 10 at 9:44

View 2 Replies!   View Related
User Login System And Save Data In Sql - Server
I am making a SignUp Page in ASP.Net 4.0 and i am facing a problem that How to store Signup Data in SQL Server 2008-R2 like User Name,User Id or Password.

Posted: Jan 13, 2011 08:41 AM

View 9 Replies!   View Related
How To Save A Docx File In Sql Server 2005 And Display It In Aspx Pages As Docx Document
i am using visual stdio 2005 and sql server 2005 for making a apllication

i want to save user's doc,docx file in database and show the uploaded user doc ,docx file in asp page

Posted: Dec 15 10 at 11:47

View 1 Replies!   View Related
Read Word Document And Save Changes In Word Document Located In Folder?
In ASP.Net Webapplication(.Net2.0) I have to save a word document in folder called "Documents" and after saving i have to open the word document for making some changes.I want that the changes

must be saved in word document and itWord Documentget replaced by orginal one in "Documents" folder.

I have searched on net and come across rich text editor developed in windows(c#)

but i want to develop same functionalityin Web Application in C#.

Posted: Feb 24, 2009 06:03 AM

View 5 Replies!   View Related
Getting System.IO.FileNotFoundException When Trying To Access A Path Like: C:Path~somePathPathfil.ext?
I am getting System.IO.FileNotFoundException when trying to access apath like: C:Path~somePathPathfil.ext

Posted: Sep 24, 2009 04:44 PM

View 3 Replies!   View Related
What Is The Path To Document In Resources Folder
I have an xml document in a folder called resources in my solution.

what is the path to the document, so my code looks somethinglike this


Posted: Mar 29, 2010 01:22 PM

View 1 Replies!   View Related
Custom Server Controls :: CompositeControl Does Not Retrieve FormView Data On PostBack ("Save")
Background:I'm building acustom control as a base class that derives from CompositeControl.It consists of a FormView, a ObjectDataSource and a CRUD-Button Series (Create, Read, Update, Delete - Buttons). I'm loading the different FormView templates within the deriving classes dynamically from file with Page.LoadTemplate().

Class structure:




Each deriving class knows the specific template-paths for loading FormViews templates.

The ObjectDataSource is connected with a DAL using a Select and an Update Method. The Select-Method works fine: When loading the CompositeControl the data of the DAL are shown in theLabels of the embedded FormView (ReadOnly-Template). When I'm switching to Edit Mode the data also are displayed in the TextBoxes (Edit-Template).

The problem occurs when I'm trying to update data using the "Save" - Button: The connected DAL-Method is calling properly, but the parameters all are NULL.Tree structureof this customcontrol:

Panel -
--- FormView
EditTemplate (ascx): Name, Name1, Segment
--- ObjectDataSource
--- CRUD-Button Stack: New, Edit, Delete, Save, Cancel, Copy, Print

All controls will be added dynamically in the base class "TabControlBase" within the overridden CreateChildControls - method. The CreateChildControls method is called by the deriving classes e.g. Employer after setting specific properties e.g. templates,
object data source methods etc.The control is placed in a simple abc.aspx-Page. What I detected so far on PostBack

- When I'm looking at the ViewState Collection within the OnLoad-method of the abc.aspx the ViewState-Collection is Null (Count = 0)

- It seems that the control tree is empty. I'm not able to find any control using a proper working recursive FindControlMethod

- Only the Page.Request Collection shows the expected controls

Conclusion for now:It seems that the CompositeControl "forgets" the values of the FormView TextBoxes on PostBack. It seems it has to do with ViewState Management.

Posted: Feb 10, 2010 10:24 AM

View 2 Replies!   View Related
SQL Server :: "Invalid Object Name" - Error When Try To Save Stored Procedure
I'm completely ignorant when it comes to SQL Server, so bear with me. I'm following a tutorial on writing a poll [URL] and when I try to save the Stored Procedure I get "Invalid object name 'dbo.NewPoll'". I'm using Visual Studio 2010 and SQL Server 2008 Express. I'm the systems administrator of my production server, infact I have the "box" downstairs.So I can do any changes and all that.familiar with MySQL, maybe I'm not twigging on to something yet.

Posted: Nov 02, 2010 11:49 PM

View 3 Replies!   View Related
Insert Word Document And Retrieve It
i want to insert a word document in to database and retrive it ...whileretriving it would be better to view in a webpage the doc file. Elseafter retriving there should be download buttons for each document ...clicking leads to the ordinary document download

Posted: Nov 28, 2010 12:05 PM

View 1 Replies!   View Related
Databases :: How To Retrieve Images And Document In Database
i can view the images from the database (datatype = binary) but the problem is the .doc and pdf is not appearing at the page...


Posted: Jun 09, 2010 11:50 AM

View 5 Replies!   View Related
Download Pdf Document In Save As Dialog
I am using following code for download pdf in save as dialog but there is problem in IE,


Posted: Nov 03, 2010 01:47 PM

View 3 Replies!   View Related
Web Forms :: How To Ask Save / Open A Document
1 ) Resources.html on clicking on that link i am forwarding the docname to contactus.html page then on clicking submit button then i am forwarding to .html

" Docname present in ResourcesDocname.pdf "

while loading the thankyou.html page i need to ask to Open/Save/Cancel the particular filemay i know how can i implement this one

2) how can i implement the search facililty in my site .

Posted: Oct 21, 2009 03:18 PM

View 1 Replies!   View Related
Can Download PDF Document On Save As Dialog
I am using following code for downloading PDF document in save as mode but there is a problem in IE,

private void DownloadFile(string fname, bool forceDownload)
string path = MapPath(fname);
string name = Path.GetFileName(fname);
string ext = Path.GetExtension(fname);
string type = "";

Posted: Nov 3 10 at 13:55

View 1 Replies!   View Related
Open / Edit And Save Excel Document In C#?
I already searched the web for about 10 hours, but couldn't find any proper solution on how to open and save a .xls excel sheet in asp c#. I know this is possible by using the Office Web Component, but there are nearly no references for it.

I only found some VB.Net references, but shame on me ... I'm not good enough to rewrite it in c#. Look here: [URL]

If someone got some C# ASP sample projects or a very good reference, I would be very happy.

Posted: Jul 14, 2009 12:27 PM

View 5 Replies!   View Related
Open, Edit And Save A Word Document?
I want to get a word document from data base by ASP.Net and show it on Internet Explorer, then I want to edit some text and replace this document with the original one, exactly same as Sharepoint. I couldn't find any tutorial or example for this situation.

Posted: May 30 10 at 12:23

View 1 Replies!   View Related
Web Forms :: Open A Word Document Or PDF Stored On The LAN
Ineed to be able to click on a button and have it open a word documenthelp filethat is stored on the LAN (e.g. \serverfilepath.doc). The word doc can be opened in Word or in the browser, which ever is easier. What's the easiest way to do this?Opening a PDF is even easier, I'm open to that option as well. I'm running Visual Studio 2008 with VB codebehind.

Posted: Nov 22, 2010 02:41 PM

View 3 Replies!   View Related
Web Forms :: Upload A Document / Pdf File And Save It To A Certain Directory?
I am trying to include the file-upload control on my / website.

I wanttogive my users the ability to upload a pdf / doc / xls file and save it using the ID that is going to be assigned to their record that they are creating.

For example:

I'm joeSmoe the user -- I wantjoeSmoe to be able to upload his document and when it saves it

- save it to a designated location under a designated name (which i'll give to itvia a vairableon my back end code.). How can I save this document like this AND then pull it up again when I go to retrieve it on page2.

Posted: Sep 02, 2009 08:05 PM

View 2 Replies!   View Related
How To Retrieve The Virtual Path
I'm testing my web app locally and I need to refer to the virtual path.


Protected Sub ddlEvent_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ddlEvent.SelectedIndexChanged
If ddlEvent.Text.Length > 0 Then
ImageDir = "C:WebsitesPF" & ddlEvent.SelectedItem.Text & ""
Dim pics As ArrayList = New ArrayList()
Dim s As String, html As String
For Each s In Directory.GetFiles(Server.MapPath(ImageDir), "*.jpg")
html = "<a href=""" & ImageDir & Path.GetFileName(s) & """>" & _
"<img src=""" & ImageDir & Path.GetFileName(s) & """>" & _
dlPictures.DataSource = pics
End If
Catch ex As Exception
mmp.errorLabel.Text = ex.Message
End Try
End Sub

For some reason it doesn't like the highlighted line of code even though it is a valid path. When I run the app, I get the error message:

"C:WebsitesPFTestImages is not a valid virtual path"

Posted: Dec 10th, 2009, 02:01 PM

View 5 Replies!   View Related
Retrieve The Path Of Exe File?
i have a small doubt. how to retrieve the exe path when we click on the button.the exe file enter on the textbox and then click on the button then i want to search the entire system the given file is available in the system r not.

Posted: May 28, 2009 07:28 AM

View 3 Replies!   View Related
How To Scale Document Storage System
I maintain a web application (ASP.NET/IIS7/SQL2K8/Win2K8) that needs to access documents, actually hundreds of thousands of documents, and growing. Currently, they are all on a Windows 2K8 Server fileshare, being accessed by UNC path (SMB). The files are in a single flat directory and I'm trying to plan how to best improve this solution. I don't want to use the SQL Filestream attribute as it would be significant effort to migrate it all into that, and would really lock in to SQL Server. I also need to find a way to replicate the data for disaster recovery, so perhaps a solution can help with that too. Options could be: Segment files into multiple directories? application would add metadata for which directory it's on (or segment by other means) Segment files into separate servers? (virtualize)Backup becomes more complicated. Application would add metadata for which server it's on

NAS Storage
SAN Storage

Put a service (WCF) in front of the files and have the app talk to the service bonus of being reusable across many applications Assuming I'm going to store on filesystem and not in database (I've read those disccusions here), which would be a more scalable solution?

Posted: Feb 1 at 4:25

View 1 Replies!   View Related
How To Retrieve The Path Info String
I wanted to retrieve the path info string, therefore, my URL is like:


But when I go to the URL like that, all my stylesheet.css, and image path have changed to invalid ones. My css and images are in the root directory, how can I resolve that with provided URL like that?

Posted: Aug 4th, 2009, 12:03 PM

View 3 Replies!   View Related
Web Forms :: Open Word Document Stored As A Blob Into An Iframe?
I am pulling word documents that have been stored in our db as blobs and presenting them to the user. As you can see below, I am writing to the http stream via BinaryWrite. This is causing the Microsoft Word application to open in a separate window. My goal was to open the word document inside of the browser instead. Preferably inside of an iframe within the browser. Is there a way to target an iframe by some analog of the method below?


Posted: Apr 14, 2010 06:02 PM

View 3 Replies!   View Related
Copyright 2005-08, All rights reserved