Saving A Word File In Sql Server From ASP.NET Page
Feb 18, 2008hi,
please tell how to make able the asp.net page to upload a word file in sqlserver database and also retrieve it back
hi,
please tell how to make able the asp.net page to upload a word file in sqlserver database and also retrieve it back
Hi all, I have an requirement that, I want to save data getting from text boxes etc..,on button click the data should be saved in database and also the data must be saved as word document with a file name with in the same database table which i am saving the data..i hope it's clear... I reached upto saving the data under button click..but I stuck up in converting the data to word and saving the same data in server ..??how to convert page data into word and at the same time i want that doc file to save in a table in serverThanks & Regards,Vamsee.
View 1 Replies View RelatedI am trying to save an MS WORD document... What Data type should I use?
I know in Sybase we used BLOB...
i need to know how can i store my word document into Sql server Database
what data type ?
how can i implenet this using ASP.net
hi
I have binary files inside my database. and user should have the opportunity to download them from database to his computer. I don't want to retrive and save the file into the server first and then let him to download. is it posible???
thank you in advance
regards
hello,I am building a web page in asp.net 2.0 and i'm looking for a way to save various files uploaded by users (such as doc, pdf, cs, txt .... whatever). Obviously the normal way would be to store it on the filesystem of the web server (or any other middleware server).But I am asking if there is a way to store these files in the database, and not affect too much of the performance of the web page?I know a picture can be stored easily, but what about all the other file types? I would appreciate if someone can spead light of the subject.Thanks,Tranquil.
View 1 Replies View RelatedOne people created a word input file (15 pages, including check boxes, text boxes, drop down lists...). Is it possible to save data in word input file to SQL table?
View 1 Replies View RelatedHi all,please have a look of code i am unable to perform save operation onthe asp.net web page.I ahve written a stored procedure. the same code works if all aretextboxes, but some of textbox replaced with dropdownlist box thenthis save operation doesn't occurs. please let me know where is themistake in coding .vb.net code :- Protected Sub btnSave_Click(ByVal sender As Object, ByVal e AsEventArgs) Dim employmentID As Integer =Request.QueryString("employmentID") Dim resourceID As Integer = Request.QueryString("resourceID") Dim projectID As Integer = Request.QueryString("ProjectID") Dim dbconsave As SqlConnection dbconsave = New SqlConnection(HRISDBConnectionString) Dim dbcomsave As New SqlCommand("sp_save_NewHireEmailnotify",dbconsave) dbcomsave.CommandType = CommandType.StoredProcedure dbcomsave.Parameters.Add(New SqlParameter("employmentID",SqlDbType.Int)) dbcomsave.Parameters("employmentID").Value = employmentID dbcomsave.Parameters.Add(New SqlParameter("resourceID",SqlDbType.Int)) dbcomsave.Parameters("resourceID").Value = resourceID dbcomsave.Parameters.Add(New SqlParameter("ProjectID",SqlDbType.Int)) dbcomsave.Parameters("ProjectID").Value = projectID dbconsave.Open() dbcomsave.Parameters.Add("@PreferredFirstName",SqlDbType.VarChar) dbcomsave.Parameters.Item("@PreferredFirstName").Value =txtPreferredFirstName.Text.ToString() dbcomsave.Parameters.Add("@PreferredLastName",SqlDbType.VarChar) dbcomsave.Parameters.Item("@PreferredLastName").Value =txtPreferredLastName.Text.ToString() dbcomsave.Parameters.Add("@CellPhone", SqlDbType.VarChar) dbcomsave.Parameters.Item("@CellPhone").Value =txtCellPhone.Text.ToString() dbcomsave.Parameters.Add("@HomePhone", SqlDbType.VarChar) dbcomsave.Parameters.Item("@HomePhone").Value =txtHomePhone.Text.ToString() dbcomsave.Parameters.Add("@HomeAddressLine1",SqlDbType.VarChar) dbcomsave.Parameters.Item("@HomeAddressLine1").Value =txtHomeAddressLine1.Text.ToString() dbcomsave.Parameters.Add("@HomeAddressLine2",SqlDbType.VarChar) dbcomsave.Parameters.Item("@HomeAddressLine2").Value =txtHomeAddressLine2.Text.ToString() dbcomsave.Parameters.Add("@HomeAddressState",SqlDbType.VarChar) dbcomsave.Parameters.Item("@HomeAddressState").Value =txtHomeAddressState.Text.ToString() dbcomsave.Parameters.Add("@HomeAddressCity",SqlDbType.VarChar) dbcomsave.Parameters.Item("@HomeAddressCity").Value =txtHomeAddressCity.Text.ToString() dbcomsave.Parameters.Add("@HomeAddressZIP", SqlDbType.VarChar) dbcomsave.Parameters.Item("@HomeAddressZIP").Value =txtHomeAddressZIP.Text.ToString() dbcomsave.Parameters.Add("@HomeAddressCountry",SqlDbType.VarChar) dbcomsave.Parameters.Item("@HomeAddressCountry").Value =txtHomeAddressCountry.Text.ToString() dbcomsave.Parameters.Add("@ArrangementType",SqlDbType.VarChar) dbcomsave.Parameters.Item("@ArrangementType").Value =ddlArrangementType.SelectedItem.ToString() dbcomsave.Parameters.Add("@PracticeGroup", SqlDbType.VarChar) dbcomsave.Parameters.Item("@PracticeGroup").Value =ddlPracticeGroup.SelectedItem.ToString() dbcomsave.Parameters.AddWithValue("@EquipmentNeeds",txtEquipmentNeeds.Text.ToString()) Try dbcomsave.ExecuteNonQuery() lblMessage.Text = "Record saved successfully" Catch ex As Exception End Try dbconsave.Close() End Sub==============================================================================.aspx code :-<table> <tr> <td > <asp:LabelID="lblPreferredFirstName" runat="server" Text="Name(Preferred FirstLast) :" ForeColor="Blue"></asp:Label> </td> <td <asp:TextBoxID="txtPreferredFirstName" runat="server" Text="" BorderStyle="None"></asp:TextBox> <asp:TextBoxID="txtPreferredLastName" runat="server" Text="" BorderStyle="none" ></asp:TextBox> </td> </tr> <tr> <td > <asp:Label ID="lblCellPhone"runat="server" Text="CellPhone :" ForeColor="Blue"></asp:Label> </td> <td > <asp:TextBox ID="txtCellPhone"runat="server" Text="" ></asp:TextBox> </td> </tr> <tr> <td > <asp:Label ID="lblHomePhone"runat="server" Text="HomePhone :" ForeColor="Blue"></asp:Label> </td> <td > <asp:TextBox ID="txtHomePhone"runat="server" Text="" ></asp:TextBox> </td> </tr> <tr> <td > <asp:LabelID="lblHomeAddressLine1" runat="server" Text="HomeAddressLine1 :"ForeColor="Blue"></asp:Label> </td> <td > <asp:TextBoxID="txtHomeAddressLine1" runat="server" Text="" ></asp:TextBox> </td> </tr> <tr> <td > <asp:LabelID="lblHomeAddressLine2" runat="server" Text="HomeAddressLine2 :"ForeColor="Blue"></asp:Label> </td> <td > <asp:TextBoxID="txtHomeAddressLine2" runat="server" Text="" ></asp:TextBox> </td> </tr> <tr> <td > <asp:LabelID="lblHomeAddressState" runat="server" Text="HomeAddressState :"ForeColor="Blue"></asp:Label> </td> <td > <asp:TextBoxID="txtHomeAddressState" runat="server" Text="" ></asp:TextBox> </td> </tr> <tr> <td > <asp:LabelID="lblHomeAddressCity" runat="server" Text="HomeAddressCity :"ForeColor="Blue"></asp:Label> </td> <td > <asp:TextBoxID="txtHomeAddressCity" runat="server" Text="" ></asp:TextBox> </td> </tr> <tr> <td > <asp:LabelID="lblHomeAddressZIP" runat="server" Text="HomeAddressZIP :"ForeColor="Blue"></asp:Label> </td> <td > <asp:TextBoxID="txtHomeAddressZIP" runat="server" Text="" ></asp:TextBox> </td> </tr> <tr> <td > <asp:LabelID="lblHomeAddressCountry" runat="server" Text="HomeAddressCountry :"ForeColor="Blue"></asp:Label> </td> <td > <asp:TextBoxID="txtHomeAddressCountry" runat="server" Text="" ></asp:TextBox> </td> </tr> <tr> <td > <asp:Label ID="lblArrangement"runat="server" Text="Arrangement :" ForeColor="Blue"></asp:Label> </td> <td > <asp:DropDownListID="ddlArrangementType" runat="server" Width="160px"DataSourceID="ObjectDataSourceArrangementType"DataTextField="ArrangementType" DataValueField="ArrangementType"OnDataBound="ddlArrangementType_DataBound"> </asp:DropDownList> <%--<asp:TextBoxID="txtArrangement" runat="server" Text="" ></asp:TextBox>--%> </td> </tr> <tr> <td > <asp:LabelID="lblPracticeGroup" runat="server" Text="Practice Group :"ForeColor="Blue"></asp:Label> </td> <td > <asp:DropDownListID="ddlPracticeGroup" runat="server" Width="160px"DataSourceID="ObjectDataSourcePracticeGroup"DataTextField="PracticeGroup" DataValueField="PracticeGroup"OnDataBound="ddlPracticeGroup_DataBound"> </asp:DropDownList> <%--<asp:TextBoxID="txtPracticeGroup" runat="server" Text="" ></asp:TextBox> --%> </td> </tr></table>please help me to solve the issue.Thanks in advance
View 3 Replies View RelatedI am asked to create 100 procedures to a database. Any best way to create them in a database one by one by calling the files and saving the execution output files in a folder?
View 9 Replies View RelatedI am running a DBCC SHRINKFILE on "FILE1" of a database (it has fileid = 1)...intent is to remove 70GB of file space:
DBCC SHRINKFILE (N'FILE1' , 400000).
For the SPID that's doing the shrink, In activity monitor you can see:
Waittype: PAGEIOLATCH_EX on resource: 9:3:15411328
(the DB is dbid=9)
But why does it need a page from fileid=3? Are there page dependencies between files that prevent moving a page within a given file? Does it need that fileid3 page to come along?
Its just sitting there in the SUSPENDED state for the last hour....I am going to leave it another 5 hours or so before cancelling.
The dm_exec_requests has an estimated percent complete at 83% and holding....not sure if I can believe that.
Hi all,
We have our SQL Server 2005 installed in a server with below specifications.
MS Windows Server 2003 R2
Standard x64 Edition
Service Pack 2
Intel(R)Xeon(R)CPU
5160 @ 3.00GHz
3.00 GHz, 8.00 GB of RAM
The issue is ,
When a query window is opened and a procedure is executed or a DBCC command is executed , the PF usage keeps on increasing and reaches the maximum 8.81 GB and remains there forever even if the query is stopped and the session is closed.
The CPU usage also shoots up and stays between 90 - 100 %.
Now, it is not possible to open a new query or do any operation in the SQL server and a Timeout Expired error is thrown.
My questions are ,
1. Is that good for the SQL server to occupy the total RAM ?
2. Is the performance related to the RAM space occupied by SQL server ?
3. What should we do in order free the PF usage after the a process is complete ?
4. Have anyone faced similar scenario ? Any solutions ?
Thanks for your time & any help should be apprecitated.
DBLearner
Hi
I would like to know if there is some way to find a row in a table by the RID that sp_lock returns :
for example
"SELECT * FROM Authors (UPDLOCK) WHERE name = 'John'"
sp_lock returns the locked row id :
2:328:11 (file#page#slot on page)
How do i get this row???
Thanks
PB
I want to import xml file directly from web page into microsoft sql table. At the moment the import is done after the XML file is downloaded local.I want to skip this step to manualy download the file.It can be done in SQL? when i change the path i get this error: Cannot bulk load because the file URL... could not be opened. Operating system error code 123(The filename, directory name, or volume label syntax is incorrect.)
below is the code
DECLARE @idoc INT
DECLARE @doc XML
SET @Doc = (SELECT * FROM OPENROWSET(BULK 'F:Folderbrfxrates.xml', SINGLE_CLOB) AS xmlData) -- 1 LOCAL works
--SET @Doc = (SELECT * FROM OPENROWSET(BULK 'http://www.bnr.ro/nbrfxrates.xml', SINGLE_CLOB) AS xmlData) -- from web i get error
SELECT @Doc
[code]...
How can i store a word file in my database table..
View 3 Replies View RelatedHi everybody,
I'm looking for a tool or template that creates a good looking document from the rdl-files.
I need it for internal documentation.
Can you help me?
Gerd
Hi all,
After publish a report to Report Server, how can we export that report to word file ?
I used to try Office Writer tool. This tool allows to export report to word file but the report must be created in Office Writer, not report that is created in Reporting Designer of Reporting Service. Is there any way to export report to word file ?
I'm creating a website in asp.net, the main point will be to upload/download and watch video's/pictures and voice notes. I was going to go about on saving them to sql, but when I started researching I found that it is not a good idea to use sql for videos? Majority that I found said that it is more suitable with saving them to a file, but the problem is that there can be thousands of video's,please explain the difference of sql and file saving to me?how to do it as I have never worked with videos before so no idea how to begin saving and on..
View 3 Replies View RelatedI am storing my Compact Database .sdf file in Team Foundation Server while we develop on it. It is really frustrating that it is stored as a binary file. (This means that only one developer at a time can effectively work on it.)
I have yet to find a way to script objects from the .sdf file. Is there a way? I would like to find a way to store this file as SQL so that my team can work on it simultaneously and scripting it and storing it seems the best way.
If anyone has any ideas I would love to hear them.
Vaccanoll
Hi guys,
View 10 Replies View RelatedDo anyone knows the syntax for saving the results from a query to a text file
in query analyzer?
Thanks!
Vic
I have procedure. say for example...
begin
select * from table_abc
end;
suppose, i get errors i.e table not found etc etc. I want to save the errors in a file or even in a table will do.
HI every one,
I am pretty mcuh new to sql and I read all your previous replies..I jsut have my questions answered.If you can help me that would be great!
I can acces the date base using Server manager then retireve the data using the query .But now I need to convert that obtained the data into csv file n then save it into csv file.
IF you can help me out that would be great.
Hi, I'm a first time user at reporting services and in dire need of some help, I'm having a real hard time finding the information I need.
I have made two reports in Business Intelligence Development Studio that access a sql database and I can deploy them and see them at http://localhost/reports etc.
What I wan't to do is be able to "trigger" the reports to be built from a schedule (e.g. every 8 hour on weekdays, every 12 hours on weekends but should be able to be changed) and after built to be saved to a html file.
I also need to set the sql query for the dataset before generating the report (select * from table where DateTimeType between This and That).
Anyway, I'm completely lost on how to achive this and would greatly appreciate and tips or pointers to where the information can be found.
Kindest Regards
is there anyway to automatically save a view to a file at a scheduled time?
Thank you for any help or pointing me in the right direction.
Hi Gurus,
Can u help me out in the following two scenario/problems.
1. I want to save the query results (which is generated within execute sql task) to file (which does not exists & should be created at run time). is it possible?
2. Can I define the file name, in Flat File connection Manager, dynamically (by using some variable)?
Your support and help will be appreciated...
regards,
Anas
Is it possible to import data from a word table into sql table? How to import data from access and excel worksheet into sql table?
vishwa mukh
vishwamukh
so i wrote this script and its pretty sweet (tara helped me before on this one) but now, for some STRANGE reason and its been reported by users the following:
the script for example dumps "first name, last name"
when we save the results as a CSV it looks good in notepad...
"first name, last name"
but we kept getting some kind of stange issues when we tried to dump that CSV data into another program to use... so i opened the CSV file in command prompt to see what it really looks like and it is actually "f i r s t n a m e , l a s t n a m e" with all these unnecessary spaces! why is it saving the CSV with spaces in it when my script is nothing of the sort? it was working fine last week, no changes were made to the script but now the CSV's are rendering those weird spaces.
I am brand new to SQL. Have limited coding experience w/ Visual Basic and database ops w/ Access.
I have come into possession of a SQL 2005 database. The problem is that the designer tried to re-invent the wheel and code a very very poor LMS back end for tracking and reporting. I would like, if possible, to save the database and as far as I am aware - should be able to import into Access and generate statistics and reports to my hearts content.
I have tried w/out success to save the database going through SQL Server Management Studio Express.
Any help or information that could be provided would be appreciated. Any additional information that I can provide, please let me know.
Thanks - Will
Hi
Report created in VS has some data in the page header, but when report is saved to pdf file that data disappears in page header. The data in page header that disappear are the ReportItems taken from detail line of a table in the report body. This problem started as a result of converting existing report from sql server/VS 2003 to qsl server/VS 2005.
Before conversion, report saved to Adobe pdf file showed all data. What could be the problem?
Thank you
Appreciate your help
Hi,
I am designing a site using Visual Web Developer, CSharp and Sql server Express.
One the contact page I want to put a form that allows users to enter details about
themselves. On clicking the button this will be stored in the database under a table
called subscribers. The form will have, name, address, telephone, email fields etc.
With the email addresses from the visitors I want to be able to keep them in
a newsletter section or similar which is automated so they recevie emails from time to time
Could somebody suggest a tutorial which shows how to complete this process
using c sharp and sql.
Thanks for you time
Prontonet
Hi,
Problem:
I'm using C# 2005. The data type of the bitmap file saved to database is "long binary data". It should be "OLE Object".
Source Code:
Code Snippet
Bitmap myBitmap = new Bitmap(@"c:Picture1.bmp");
OleDbConnection conn = new OleDbConnection("<<My Connection String>>");
conn.Open();
string sql = "UPDATE Table1 SET fldOLE = @fldOLE WHERE fldID = 5";
OleDbCommand command = new OleDbCommand(sql, conn);
command.Parameters.Add(new OleDbParameter("@fldOLE", myBitmap));
int rowsAffected = command.ExecuteNonQuery();
Question:
How can I save Bitmap to database with data type "OLE Object"?
I want to save the Excel Export underneath an intranet hyperlink ? What would be the best way to do that .Right now, i am trying the regular excel file path option and placing the http link in there.
I am getting an error message on execution.
Thanks
Hi,
How to save the SSIS package results to log file using dtexec command............please help regaridng this...........
Thanks in advance,