Which Is Better? Storing Data In The Database OR Storing It In The File System

Dec 29, 2006

Hello there,
I just want to ask if storing data in dbase is much better than storing it in the file system? Because for one, i am currenlty developing my thesis which uploads a blob.doc file to a web server (currently i'm using the localhost of ASP.NET) then retrieves it from the local host
Also i want to know if im right at this, the localhost of ASP.NET is the same as the one of a natural web server on the net?
 
Because i'm just thinking of uploading and downloading the files from a web server. Although our thesis defense didn't require us to really upload it on the net, we were advised to use a localhost on our PC's. I'll be just using my local server

 Is it ok to just use a web server for storing files than a database?

   

View 6 Replies


ADVERTISEMENT

Storing Images In SQL Server Vs File System

Mar 5, 2007

I am looking for some microsoft recommendation on storing images in SQL Server Vs File System. Here is what our requirement is.

Currently we are using SQL Server 2000 with a VB6(COM+) & ASP front end. Our architecture involves Log Shipping & Replication. We use log shipping for our DR site and Replication to replicate to Datawarehouse & DB2 enviornment. I have been trying to research this topic and have come up with opinion favoring both sides mostly file system but nobody seems to point any Microsoft recommendation.

With our application we are looking for Transactions, backups, Log shipping & replication with these images. I have read MS implementation of TerraServer and there they recommend storing them in SQL Server if above is required. (https://www.microsoft.com/technet/prodtechnol/sql/2000/reskit/part3/c1161.mspx?mfr=true)

Can somebody please point me to some Microsoft recommendation and what does SQL Server 2005 offers in this aspect.

Thanks

View 1 Replies View Related

Storing The Big File In SQL Database

Nov 5, 2007

How can I store the big files in the SQL Database, like MP3 files or an image or an video file?

View 3 Replies View Related

Storing A XML File In A SQL Server Database

Jun 23, 2004

I have records with 50 plus fields of data.I was thinking of writing all the fields data into a XML file and then store it in a SQL server database for retrieval later on.Is there anyway i can go about doing this?

View 6 Replies View Related

Error Storing Data In Text File???

May 27, 2008

The error I recieve is as follows:

"[Flat File Destination [13]] Error: Data conversion failed. The data conversion for column "SDATA" returned status value 4 and status text "Text was truncated or one or more characters had no match in the target code page.". "
"[Flat File Destination [13]] Error: Cannot copy or convert flat file data for column "SDATA". "
"[DTS.Pipeline] Error: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "Flat File Destination" (13) failed with error code 0xC02020A0. The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running. There may be error messages posted before this with more information about the failure. "
"[DTS.Pipeline] Error: SSIS Error Code DTS_E_THREADFAILED. Thread "WorkThread0" has exited with error code 0xC02020A0. There may be error messages posted before this with more information on why the thread has exited. "
"[DataReader Source [207]] Error: The component "DataReader Source" (207) was unable to process the data. "
"[DTS.Pipeline] Error: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on component "DataReader Source" (207) returned error code 0xC02090F5. The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing. There may be error messages posted before this with more information about the failure. "
"[DTS.Pipeline] Error: SSIS Error Code DTS_E_THREADFAILED. Thread "SourceThread0" has exited with error code 0xC0047038. There may be error messages posted before this with more information on why the thread has exited. "

I am selecting data from an OBDC then copying it to a text file an I always get this error, but when I change the destination to a excel file it works perfectly. But the whole point of the package is to copy to a text file.

Please could you help me, your replies will be greatly appreciated.

View 5 Replies View Related

Storing Html File Inside SQL2005 Database

Oct 10, 2006

Dear all I create this html file on the fly in my asp.net application abd what i would like to do is to store it inside my sql2005 database. What would be the best way?The html file itself is not really big. Probably not more then 600 - 800 characters most. I was thinking the text type fields of the database and then when retreiving it dump it inside in a file and save the file with html extention. Are there any better sugestions? Thank you for your time

View 3 Replies View Related

What Is The Use Of Storing Data In 2 Database ? And How To Do That ?

Mar 5, 2008





Can I know answer of this question ? in detail explanation.

View 1 Replies View Related

Problem Storing Form Data Into Database

Oct 15, 2007

Hey all,         I have a form in one page and when the user clicks the submit button it has to save the data into my SQL database which i have created.It doesnt show any error and it successfully redirects to another page but not saving the data .Could someone help please.Here is my code under submit button         SqlDataSource txtDataSource = new SqlDataSource();        txtDataSource.ConnectionString = ConfigurationManager.ConnectionStrings["LocalSqlServer"].ToString();        txtDataSource.InsertCommandType = SqlDataSourceCommandType.Text;        txtDataSource.InsertCommand = "INSERT INTO Hamburgdata(user_name, report_type, company_name , street_address, city, state, zip_code, tax_ID) VALUES (@user_name,@report_type,@company_name ,@street_address,@city,@state,@zip_code,@Tax_ID)";        txtDataSource.InsertParameters.Add("user_name", User.Identity.Name);        txtDataSource.InsertParameters.Add("report_type", ReportType.Text);        txtDataSource.InsertParameters.Add("company_name", CompanyName.Text);        txtDataSource.InsertParameters.Add("street_address", StreetAddress.Text);        txtDataSource.InsertParameters.Add("city", City.Text);        txtDataSource.InsertParameters.Add("state", State.Text);        txtDataSource.InsertParameters.Add("zip_code", ZipCode.Text);        txtDataSource.InsertParameters.Add("tax_ID", TaxID.Text);        int rowAffected = 0;        try        {            rowAffected = txtDataSource.Insert();        }        catch (Exception exp)        {                    }        finally        {            txtDataSource = null;        }           }  ThanksVik 

View 7 Replies View Related

Designing A Database Within A Database... Design Question Storing Data...

Jul 23, 2005

I have a system that basically stores a database within a database (I'msure lots have you have done this before in some form or another).At the end of the day, I'm storing the actual data generically in acolumn of type nvarchar(4000), but I want to add support for unlimitedtext. I want to do this in a smart fashion. Right now I am leaningtowards putting 2 nullable Value fields:ValueLong ntext nullableValueShort nvarchar(4000) nullableand dynamically storing the info in one or the other depending on thesize. ASP.NET does this exact very thing in it's Session State model;look at the ASPStateTempSessions table. This table has both aSessionItemShort of type varbinary (7000) and a SessionItemLong of typeImage.My question is, is it better to user varbinary (7000) and Image? I'mthinking maybe I should go down this path, simply because ASP.NET does,but I don't really know why. Does anyone know what would be the benifitof using varbinary and Image datatypes? If it's just to allow saving ofbinary data, then I don't really need that right now (and I don't thinkASP.NET does either). Are there any other reasons?thanks,dave

View 7 Replies View Related

Retriving Data From A Remote Sql Server Database And Storing It In A Local Sqlserver Db

Aug 1, 2001

Is it possible for retriving data from a remote Sql server database and storing it in a local sqlserver database.

View 1 Replies View Related

How To Encrypt My Password Or Sensitive Data Before Storing Them In A Database , Using SQL Server 2005?[urgent Plz Help]

Jan 7, 2007

Hi there ,1. i have a database and i want to encrypt my passwords before storing my records in a database plus i will later on would require to  authenticate my user so again i have to encrypt the string provided by him to compare it with my encrypted password in database below is my code , i dont know how to do it , plz help 2. one thing more i am storing IP addresses of my users as a "varchar" is there a better method to do it , if yes plz help me    try        {            SqlConnection myConnection = new SqlConnection();            myConnection.ConnectionString = ConfigurationManager.ConnectionStrings["projectConnectionString"].ConnectionString;            SqlDataAdapter myAdapter = new SqlDataAdapter("SELECT *From User_Info", myConnection);            SqlCommandBuilder builder = new SqlCommandBuilder(myAdapter);            DataSet myDataset = new DataSet();            myAdapter.Fill(myDataset, "User_Info");            //Adding New Row in User_Info Table               DataRow myRow = myDataset.Tables["User_Info"].NewRow();            myRow["user_name"] = this.user_name.Text;            myRow["password"] = this.password.Text; // shoule be encrypted             //not known till now how to do it                       myRow["name"] = this.name.Text;            myRow["ip_address"] = this.ip_address.Text;                        myDataset.Tables["User_Info"].Rows.Add(myRow);            myAdapter.Update(myDataset, "User_Info");            myConnection.Close();            myConnection.Dispose();        }        catch (Exception ex)        {            this.error.Text = "Error ocurred in Creating User : " + ex.Message;        }  

View 3 Replies View Related

Storing File

Nov 21, 2007



Is there any method to store the MP3 file in database. And also I want free text search in the table? Please help me its important

Thanks in advance

View 3 Replies View Related

FILE DSN NOT STORING PASSWORD!

May 26, 1999

HI,

We are using a VB component which utilises a FILE DSN to connect to SQL but we have noticed that when using SQL Authentication in setting up the DSN in the control panel the password does not get saved. So the only way we can connect is to have a user with no password i.e blank.

we only noticed this when we tried to use a user other than sa which happened to have a password that is blank.

Has anybody else found a solution to this problem ?

View 1 Replies View Related

Storing A .wav File In A Table

Jul 16, 2002

Is it possible to store a .wav file in a SQL Server table? I have looked in books online and on the web... to no avail. Any info would help.

Thanks
Mike

View 1 Replies View Related

Storing A Word File In DB

May 26, 2004

How can i store a word file in my database table..

View 3 Replies View Related

Storing A Text File?

Apr 21, 2008

Hello,

In SQL 2005, what is the best way to take a text file and store it in a table field, then later extract that file to a directory with original name and format intact?

Thanks!



--PhB

View 1 Replies View Related

Storing Sound/wave File

Oct 2, 2001

How do I store a sound/wave file in SQL Server. Does SQL Server have the facility to store sound files in the database, if so what data type should be used and functions related to it.
Thanks
Paul

View 1 Replies View Related

Storing A Dynamic File Name Table

Apr 17, 2014

I have a file that is automatically generated by an external process that will always have the same name + a date stamp.I will say test_(Datestamp).txt

what i am trying to do is use sql to bulk insert this file but i will not know the full file name as the date stamp is also includes time. What my script is doing is taking this file everyday storing its contents temporarily in a table where i then use a trigger to edit and repopulate the table and kick out a new file that another external process uses.

View 4 Replies View Related

Storing A PDF File Into SQL Server 2005?

Jan 16, 2008

Does anyone know whats wrong with my code?
~Nothing wrong with my code, code is correct!

I let it run and it keeps saying that the file does not exist. Seem as though, the path of my file doesn't exist! Any suggestions on how to program the path of my file so I can be able to retreive it such as open the file and access the file?

CODE:


Imports System

Imports System.Data

Imports System.Data.Sql

Imports System.Data.SqlClient

Imports System.Data.SqlTypes

Imports System.Web

Imports System.Configuration

Imports System.Reflection

Imports System.Security.Permissions.FileIOPermission

Imports System.IO

Imports System.Collections

Imports System.Collections.Generic

Imports System.Windows.Forms

Imports System.Security.Permissions

Imports System.Windows.Forms.Form

'<Assembly: PermissionSetAttribute(SecurityAction.RequestMinimum, Name:="Local Intranet")>

'<Assembly: PermissionSetAttribute(SecurityAction.RequestOptional, Unrestricted:=True)>



Public Class Form1

Inherits Form

Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click

Dim SQL As String

Dim rawData() As Byte

Dim RowsAffected As Integer

Dim filename As String

filename = "H:My Documentsabc.pdf"

Try

If System.IO.File.Exists(filename) Then

Dim filePermission As New System.Security.Permissions.FileIOPermission(System.Security.Permissions.FileIOPermissionAccess.Read, System.Security.AccessControl.AccessControlActions.View, filename)

filePermission.Demand()

Else

MessageBox.Show("file does not exist", "File", MessageBoxButtons.OK, MessageBoxIcon.Information)

End If

Dim fs As FileStream

fs = New FileStream(filename, FileMode.Open, FileAccess.Read)

Dim FileSize = Convert.ToInt32(fs.Length)

rawData = New Byte(FileSize) {}

fs.Read(rawData, 0, FileSize)

SQL = String.Format("INSERT INTO test_file_save(FILE_ID, FILE_NAME, FILE_SIZE, CREATE_FILE) VALUES({0}, {1}, {2}, {3})", _

1, filename, FileSize, rawData)

Using Conn As New SqlConnection("server=1234;" _

& "uid=F_User;" _

& "pwd=password;" _

& "database=Database")

Using Cmd As New SqlCommand("sp_InsertPDF", Conn)

Cmd.CommandType = CommandType.StoredProcedure

Cmd.Parameters.Add(New SqlParameter("@FILE_ID", 1))

Cmd.Parameters.Add(New SqlParameter("@FILE_NAME", filename))

Cmd.Parameters.Add(New SqlParameter("@FILE_SIZE", FileSize))

Cmd.Parameters.Add(New SqlParameter("@CREATE_FILE", rawData))

fs.Close()

Conn.Open()

RowsAffected = Cmd.ExecuteNonQuery()

End Using

End Using

MessageBox.Show("File Inserted into database successfully!", _

"Success!", MessageBoxButtons.OK, MessageBoxIcon.Asterisk)

Catch ex As Exception

MessageBox.Show("There was an error: " & ex.Message, "Error", _

MessageBoxButtons.OK, MessageBoxIcon.Error)

End Try







End Sub

End Class

View 5 Replies View Related

Retrieving And Storing File Timestamp

Feb 20, 2006

I have a package that processes a flat file, which is generated by a separate system each weekday around 3:30AM. I would like my package to store the timestamp of the input file and compare it to the timestamp of the next day's file. If they are the same, then the package can exit without reprocessing a particular file again.

So, my first question is whether a package variable can be updated so that its value will persist from one run to the next?

Second, what is the syntax to retrieve the file's timestamp, either directly from the file connection manager or within a script task?

Thanks,

Phil

View 1 Replies View Related

Problem With Storing Password In File DSN

Nov 17, 2006

I am trying to create a file DSN to link a password protected access satabase to SQL server anywhere backend. I create the DSN using Microsoft Access Driver, Select my access database, go to advanced properties and type in the database password (user ID is admin). However, everytime I change records in the SQL front end, I am prompted to enter the Access database password. It doesn't seem to be storing it.

Any suggestions?

View 1 Replies View Related

Storing Query Output As File (urgent)

Dec 27, 2000

hi all...
i want to store the output of an sql query as a text file.this is for my project i am doing in java.can u help me how to do this..it is very urgent

thanking u

View 2 Replies View Related

DTS - Reading From A File , Transforming And Storing In Table

Jan 14, 2002

Hi ... I need to read rows from a large source file , check if the data selected already exists in the destination and if it does, upate the destination , else insert a new row . Now i could use a sp, but that means i have to call it for each row in the text file ...
any ideeas on what kind of package can be created /

cheers
benjamin

View 1 Replies View Related

Storing Variable In Command File From SQL Server

Sep 13, 2004

Hi,
i am using command files(.cmd) and osql utility to conneft to a database.
following is the requirement.
I have a query "SELECT top 1 au_fname FROM pubs..authors".

Can i store the value of au_fname in the command file?

Is there any work around for this.

Any help is appreciated.

Thanks.... :)

View 1 Replies View Related

SQL 2012 :: Batch File And Storing Result

Sep 29, 2015

I have to use sql cmd and run diagnostic queries.

I need to run multiple dmvs as a batch file and storing the dmv result to some place.

View 9 Replies View Related

Storing File As Binary Image Into SQL Server

Dec 21, 2005

I am using FileUpload control in ASP.net 2.0 to upload files and store them into SQL server database as an image. I am fine with MS office files, image files and etc. We have Product Center (Proe) engineering software to configure parts and the files generated through this software have PLT extension when I store these files, the file type is Plian/text. I am using Fileupload.PostedFile.Content to get the file type. How can I store PLT, TIF files in SQL server? Please help.

View 12 Replies View Related

Storing XML In Database

Jul 20, 2012

best way to store questionnaire data in a database.Since different questionnairs have different questions and formats i.e dropdown, radio, checkboxes etc building such a database model becomes highly complex.

I've read that if data schema is complex and higly variable it may be better to use an xml document and store that in a databse. However I dont quite understand how you store xml to a database. Do you simply store the entire structure in something like a nvarchar column or is there some other way to store xml to a database.

If you store the entire structure to the databse then how do you query the content to generate reports.

example xml:

Code:
<survey>
<meta>
<id>sample</id>
</meta>
<questions>
<question id="1" type="singlechoice" page="1">

[code]...

View 3 Replies View Related

Speeding Up Site By Storing Query Results In File

Mar 4, 2008

Hello,
We have some queries that are long and intensive. We have thought about running the queries and storing the data in a text file for lookup from our website.

Example: Our online store only displays items that are in stock so when a user selects a category a query runs and grabs only items that are in stock and then displays them. There could be thousands of items the query needs to sort through before displaying the items that are in stock. What if we ran this query once every hours an stored the results in a txt file? The asp page would then go to the text file to grab the results instead of having to run the query every time a user selects a category. Will this speed up the site by not having to query every time? Would this be a correct way to eliminate queries that run thousands of times a day?

thanks
Andy

View 2 Replies View Related

Storing Data

Jun 20, 2006

Hi again.

How do I store in SQL SERVER with 2 decimal places?

I set Data Type to Decimal with Scale set to 4 and Precision 19. But this doesn't work.

Any ideas? Thanks.

View 1 Replies View Related

Help Me Out For Storing More Data

Jul 16, 2006

CREATE TABLE [dbo].[blogs] (
[blog_title] [nvarchar] (500) ,
[blog_desc_full] [varchar] (8000) ,
[blogger_name] [nvarchar] (100) ,
[mailid] [nvarchar] (100) ,
[blogid] [numeric](10, 0) IDENTITY (1, 1) NOT NULL ,
[blog_desc] [nvarchar] (125) ,
[cat_name] [varchar] (100) ,
[b_url] [varchar] (250) ,
[b_date] [datetime] NULL ,
[author] [nvarchar] (250) ,
[approval] [char] (1)
) ON [PRIMARY]
GO

using this script i have created my blog table.

and a procedure given below. i am using to insert data in it.


CREATE PROCEDURE SP_BlogAdd

@blog_title nvarchar(500),
@blog_desc_full varchar(8000),
@blogger_name nvarchar(100),
@mailid nvarchar(100),
@blog_desc nvarchar(125),
@cat_name varchar(100),
@b_url varchar(250),
@author nvarchar(250)

AS

INSERT INTO blogs(blog_title, blog_desc_full, blogger_name, mailid, blog_desc, cat_name, b_url,author)
VALUES(@blog_title ,@blog_desc_full ,@blogger_name,@mailid ,@blog_desc ,@cat_name ,@b_url,@author)
GO

now, the problem i m facing is.
i am using varchar datatype for [blog_desc_full] [varchar] (8000).

i want more than this size to store data in it.

please give me some detailed code.

i tried text datatype but i didnt succeed. how to use text datatype.
i replaced with text datatype.but in length i couldnt type. it shows only 16.

Please help me out.

regards,
ASIF

View 1 Replies View Related

Help Me Out For Storing More Data

Jul 16, 2006

CREATE TABLE [dbo].[blogs] (
[blog_title] [nvarchar] (500) ,
[blog_desc_full] [varchar] (8000) ,
[blogger_name] [nvarchar] (100) ,
[mailid] [nvarchar] (100) ,
[blogid] [numeric](10, 0) IDENTITY (1, 1) NOT NULL ,
[blog_desc] [nvarchar] (125) ,
[cat_name] [varchar] (100) ,
[b_url] [varchar] (250) ,
[b_date] [datetime] NULL ,
[author] [nvarchar] (250) ,
[approval] [char] (1)
) ON [PRIMARY]
GO

using this script i have created my blog table.

and a procedure given below. i am using to insert data in it.


CREATE PROCEDURE SP_BlogAdd

@blog_title nvarchar(500),
@blog_desc_full varchar(8000),
@blogger_name nvarchar(100),
@mailid nvarchar(100),
@blog_desc nvarchar(125),
@cat_name varchar(100),
@b_url varchar(250),
@author nvarchar(250)

AS

INSERT INTO blogs(blog_title, blog_desc_full, blogger_name, mailid, blog_desc, cat_name, b_url,author)
VALUES(@blog_title ,@blog_desc_full ,@blogger_name,@mailid ,@blog_desc ,@cat_name ,@b_url,@author)
GO

now, the problem i m facing is.
i am using varchar datatype for [blog_desc_full] [varchar] (8000).

i want more than this size to store data in it.

please give me some detailed code.

i tried text datatype but i didnt succeed. how to use text datatype.
i replaced with text datatype.but in length i couldnt type. it shows only 16.

Please help me out.

regards,
ASIF

View 1 Replies View Related

Error While Storing A Zip File With Size More Than 1MB In MS SQL Server 2005 Express

Aug 9, 2007

I want to store a Zip file as a BLOB, but I get an error:
"File 'C:<path of mdf file> ' appears to have been truncated by the operating system. Expected size is 2560KB but actual size is 1536KB "
whenever the BLOB exceeds 1MB.

Any suggestions? How can I store larger .ZIP files to the Database?
I am using MS SQL 2005 Express and the data type that I gave for the column to store Blob is "varbinary(MAX)".

I am inserting byte array in to this field.
It works fine for a zip file less than 1MB but as soon as the zipped file size increases beyond 1MB, lots of error pop-up and then the database is not readable. Its says that, the data in the data base may have been corrupted...

View 5 Replies View Related

Storing History In Database

Nov 25, 2003

Does anyone currently do this. I want to store an audit history for changes made in the database through our web application.

I would like some kind of history table structure. I would be interested to see if anyone else has done this and what your structure looks like.

ScAndal

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved