Saving Files In DB

Apr 14, 2006

In my system, I generate invoices as PDF for my clients and I need to email them and save them on the database. What is the best approach for achieving that?!

 

Shall I save the files path in the SQL server 2000 as ( varchar ) and save files in a folder in the server or there is another approach?! is there any recommendation or advice about the procedure to send emails shall i save them first then send them or ...!??

 

Appreciate your advice!

View 1 Replies


ADVERTISEMENT

Saving Mp3 Files In The Database

May 11, 2007

has anyone got any opinions on the pros/cons of storing mp3 files in the database instead of the file system ?
How could this be done ?  Would it be a binary data type ?

View 1 Replies View Related

Saving Files In SQL Server

Jun 27, 2004

Hello there,

I was thinking about saving some files in a SQL Server DB and then reading those back to the client for download. Any warnings that I should know about before doing so? The files will generally be at most 2mb in probably .pdf format. I've heard bad things about doing this in Access...but then again, SQL Server isn't access.

View 3 Replies View Related

Saving And Retreivig The Files On Sqlserver

Sep 12, 2007

Hi!
I want to save and retreive some files on sqlserver. I want to save the files in binary format on sqlserver and I want to get back them in their format.Is it possible in c#? If possible please help me to do this. I already succeeded to save a file in binary format, but i am getting problem to retreive that in its format.
Thanks in adance

View 1 Replies View Related

Saving Files To SQL Server 2000

Feb 27, 2004

Someone:
I have the need to upload a file via a webpage and then save that file into the database. I would also like to retrieve it and show it to the user.

Can someone show me an example of how this should be done. Also I am concerned of the pros and cons of saving files in the database. Is there a performance hit on the server? Will it make the database unstable? Has anyone had problems doing this?

Any suggestions, samples, and/or help are welcome.

View 3 Replies View Related

Saving Images Or Multimedia Files In SQL Server

Feb 16, 2005

Hi !!

If i want to save, images, video clips or movies ......(multimedia stuff) in the SQL Server. Any idea how can i save them and call them. I also, want to know if that the effecient way to the task or there are other ways to di it???

Thanks!!!!

View 1 Replies View Related

Saving Or Copying Enterprise Manager Files

Dec 11, 2000

hello all,

Does anyone know know which files Enterprise Manager uses to save the settings (i.e. registered computers and groups)?

I would like to reinstall enterprise manager, but I do not want to reconfigure all of the server registrations.

Thanks,

Matt

View 1 Replies View Related

Saving Files (Binaries) Into Database - Pros And Cons

Jun 19, 2008

Can someone provide information or a link to information regarding the pros and cons of saving files directly into a SQL 2005 database?
I'm actually for saving files to a database (cleaner implementation then just saving the location then having to get the file, etc), but my project manager is not convinced so I need to make an argument for (or against depending on what I actually find out) using varbinary data type.
Thanks.

View 2 Replies View Related

Automating Report Execution - Saving To Separate Files

Sep 20, 2007

I'm trying to do something which I hope can be accomplished relatively simply.

I have a report similar to bank statements let's say. When run, it currently prints out each person's statement into one file, with page breaks sepearating each person's statement. What I need to do, is when the report is run, save each person's report into a seperate file for the purpose of emailing to them later.

I could easily modify my report to just output for one particular person, but I'm not sure if there's a way to "bulk render" all the reports and have them saved to sepearate files.

I should also add that I'm using an MS Access Data Project (ADP) as the front end to my app - connected to a SQL Server 2005 DB. I currently display the reports by embedding a web browser object into an Access form and rendering the report via HTML.

Thanks in advance,

H

View 1 Replies View Related

SQL Server 2012 :: How To Fetch PDF Files From A Folder And Saving It In The Database

Jul 23, 2013

I have a small project to be done in which I need to fetch the pdf file from a my system and save it in database and also fetch the name of it and save it in the database.

View 9 Replies View Related

Automating A Query And The Saving Saving Of Subsequent Results

Dec 13, 2007

Hi Guys,

I am trying to automate a basic task using SQL Server 2005 Express.

Currently I have a query script that I run and then save the results as a CSV file. I need to do this on a daily basis and so I am looking to find out how best to go about this. There are a multitude of third party tools that claim to be able to do this - can anyone recommend this or enlighten me of the best way to set up this automation.

All ideas gratefully received!

View 1 Replies View Related

SQL Server Admin 2014 :: Separate Data Files / Log Files / TempDB / Backups

Jan 9, 2015

I proposed on a new server that we separate Data Files, Log Files, tempDB, Backups, etc. onto separate LUNS on a SAN with High Speed Solid State Drives.I was told that with the new technology with solid state SAN's that it would decrease performance and that it did not work the same way as it did when you had RAID 5's etc.I thought that if things were cared out correctly by a SAN Administrator they would know how to configure for optimal performance.

View 2 Replies View Related

For Loop - Iterate From Older Files To Newer Files Based On File's Timestamp

Mar 13, 2008

In the For Loop, How to Iterate from Older flat files to Newer flat files based on File's Timestamp. If there are some older files in that folder, it should be processed first and then continue with the newer one.

Any Suggestions?

View 3 Replies View Related

Script Task: How To Compare Files On FTP With Existing Files In Local Folder Before Transfer!

Apr 24, 2008

In the first step of my SSIS package I need to get files from FTP and dump it/them in a local directory, but it's more than that, the logic is like this:
1. If no file(s) found, stop executing and send email saying no file(s) found;
2. If file(s) found, then compare it/them with existing files in our archive folder; if file(s) already exist in archive folder, stop executing and send email saying file(s) already existed, if file(s) not in archive folder yet, then transfer it/them to the local directory for processing.

I know i have to use a script task to do this and i did some research and found examples for each of the above 2 steps and not both combined, so that's why I need some help here to get the logic incorporated right.

Thanks for the help in advance and i apologize for the long lines of code!

example for step 1:
----------------------------------------------------------------------------------------------------------

' Microsoft SQL Server Integration Services Script Task
' Write scripts using Microsoft Visual Basic
' The ScriptMain class is the entry point of the Script Task.

Imports System
Imports System.Data
Imports System.Math
Imports Microsoft.SqlServer.Dts.Runtime
Imports Microsoft.SqlServer.Dts.Pipeline.Wrapper
Imports Microsoft.SqlServer.Dts.Runtime.Wrapper
Imports Microsoft.VisualBasic.FileIO.FileSystem
Imports System.IO.FileSystemInfo

Public Class ScriptMain

' The execution engine calls this method when the task executes.
' To access the object model, use the Dts object. Connections, variables, events,
' and logging features are available as static members of the Dts class.
' Before returning from this method, set the value of Dts.TaskResult to indicate success or failure.
'
' To open Code and Text Editor Help, press F1.
' To open Object Browser, press Ctrl+Alt+J.

Public Sub Main()

Dim cDataFileName As String
Dim cFileType As String
Dim cFileFlgVar As String
WriteVariable("SCFileFlg", False)
WriteVariable("OOFileFlg", False)
WriteVariable("INFileFlg", False)
WriteVariable("IAFileFlg", False)
WriteVariable("RCFileFlg", False)
cDataFileName = ReadVariable("DataFileName").ToString
cFileType = Left(Right(cDataFileName, 4), 2)
cFileFlgVar = cFileType.ToUpper + "FileFlg"
WriteVariable(cFileFlgVar, True)
Dts.TaskResult = Dts.Results.Success
End Sub
Private Sub WriteVariable(ByVal varName As String, ByVal varValue As Object)
Try
Dim vars As Variables
Dts.VariableDispenser.LockForWrite(varName)
Dts.VariableDispenser.GetVariables(vars)
Try
vars(varName).Value = varValue
Catch ex As Exception
Throw ex
Finally
vars.Unlock()
End Try
Catch ex As Exception
Throw ex
End Try
End Sub
Private Function ReadVariable(ByVal varName As String) As Object
Dim result As Object
Try
Dim vars As Variables
Dts.VariableDispenser.LockForRead(varName)
Dts.VariableDispenser.GetVariables(vars)
Try
result = vars(varName).Value
Catch ex As Exception
Throw ex
Finally
vars.Unlock()
End Try
Catch ex As Exception
Throw ex
End Try
Return result
End Function
End Class

example for step 2:
-------------------------------------------------------------------------------------------------------

' Microsoft SQL Server Integration Services Script Task

' Write scripts using Microsoft Visual Basic

' The ScriptMain class is the entry point of the Script Task.

Imports System

Imports System.Data

Imports System.Math

Imports Microsoft.SqlServer.Dts.Runtime

Public Class ScriptMain

' The execution engine calls this method when the task executes.

' To access the object model, use the Dts object. Connections, variables, events,

' and logging features are available as static members of the Dts class.

' Before returning from this method, set the value of Dts.TaskResult to indicate success or failure.

'

' To open Code and Text Editor Help, press F1.

' To open Object Browser, press Ctrl+Alt+J.

Public Sub Main()

Try

'Create the connection to the ftp server

Dim cm As ConnectionManager = Dts.Connections.Add("FTP")

'Set the properties like username & password

cm.Properties("ServerName").SetValue(cm, "ftp.name.com")

cm.Properties("ServerUserName").SetValue(cm, "username")

cm.Properties("ServerPassword").SetValue(cm, "password")

cm.Properties("ServerPort").SetValue(cm, "21")

cm.Properties("Timeout").SetValue(cm, "0") 'The 0 setting will make it not timeout

cm.Properties("ChunkSize").SetValue(cm, "1000") '1000 kb

cm.Properties("Retries").SetValue(cm, "1")

'create the FTP object that sends the files and pass it the connection created above.

Dim ftp As FtpClientConnection = New FtpClientConnection(cm.AcquireConnection(Nothing))

'Connects to the ftp server

ftp.Connect()

'ftp.SetWorkingDirectory("..")

ftp.SetWorkingDirectory("directoryname")

Dim folderNames() As String

Dim fileNames() As String

ftp.GetListing(folderNames, fileNames)

Dim maxname As String = ""

For Each filename As String In fileNames

' whatever operation you need to do to find the correct file...

Next

Dim files(0) As String

files(0) = maxname

ftp.ReceiveFiles(files, "C: emp", True, True)

' Close the ftp connection

ftp.Close()





'Set the filename you retreive for use in data flow

Dts.Variables.Item("FILENAME").Value = maxname

Catch ex As Exception

Dts.TaskResult = Dts.Results.Failure

End Try

Dts.TaskResult = Dts.Results.Success

End Sub

End Class

View 16 Replies View Related

SQL 2012 :: FOR FILES Command To Delete Old Backup Files On Remote Server?

Feb 24, 2015

I have the need to delete old backup files via TSQL job. Found this solution online:

PushD "
emoteservershareDIFF" &&(
forfiles -m *DIFF*.sqb -d -1 -c "cmd /c del /q @path"
) & PopD

It works remotely if I run it via command prompt. But when I add this to a TSQL job on my remote SQL instance, it runs without deleting anything. What I'm missing?

View 6 Replies View Related

HELP!!! Cannot Import SSIS Package Files From .dtsx Files

Oct 8, 2007





Brief overview...Running SQL Server 2003 Server Enterprise 64 bit - All Service Packs and patches current
SQL Server 2005 Enterprise Edition 64 bit Build Microsoft SQL Server 2005 - 9.00.3054.00 (X64) Mar 23 2007 18:41:50 Copyright (c) 1988-2005 Microsoft Corporation Enterprise Edition (64-bit) on Windows NT 5.2 (Build 3790: Service Pack 2)

I cannot import any SSIS packages nor crete any new folders under stored packages. I hve googled the news groups and looked at BOL to no avail. HELP!!!!

View 20 Replies View Related

Not Saving

Nov 22, 2006

Please i need to save records using DataSet. I created the connectionstring as a global variable. In th button_Click event i have this :
Protected Sub btnAdd_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Dim InsAdapter As New SqlDataAdapter
Dim StrInsert As String = "insert into Products(CategoryId,ProductName,ProductCode,ProductPrice,) values(@CategoryId,@ProductName,@ProductCode,@ProductPrice)"
Dim ObjComm As New SqlCommand(StrInsert, ObjConn)
ObjComm.Parameters.Add("@CategoryId", SqlDbType.Int).Value = drpCategory.SelectedValue
ObjComm.Parameters.Add("@ProductName", SqlDbType.NVarChar, 30).Value = txtName.Text
ObjComm.Parameters.Add("@ProductCode", SqlDbType.NVarChar, 10).Value = txtCode.Text
ObjComm.Parameters.Add("@ProductPrice", SqlDbType.Int).Value = txtPrice.Text
InsAdapter.InsertCommand = ObjComm
End Sub
But on clicking the button, the record is never saved. Please help

View 4 Replies View Related

Saving To SQL

Nov 29, 2007

I am currently migrating my application from Access to SQL. It looks like it's working good but one thing I cannot understand is why when I have created a varchar(40) field and after I insert a field that is less then 40 characters long, the rest of the string is filled with the leading spaces. I have also create an nchar(40) that did not solve it ether. For example: the text is "Hello World". The text is 11 characters long but the data saved to the table is: "Hello Wolrd" + 29 spaces. Am I doing something wrong?Thanks for your help in advance. 

View 6 Replies View Related

DTS Not Saving

Dec 5, 2007

When I open a DTS package, save it as a bas file, make changes, close the package and save it when prompted, where are my changes saved?

The answer appears to be nowhere. When I reopen the package it's back to it's original setup. When I check the bas file it's as it was when I originally saved it.

Any ideas? Like where my mornings work is gone?

View 3 Replies View Related

Saving Changes

Feb 27, 2008

We have a table with 3.5 million records in it. We have been forced to add two fields and set indexes on those fields. But when we try to save the changes it times out. When we try to generate a change script it also times out. Is this a memeory issue? Any ideas on whats causing this or how to fix it woudl be greatly appriciated.

View 4 Replies View Related

Saving Changes

Nov 20, 2007

Hi, all.This might be a silly question... but I am very new to programming inSQL so please bear with me :)So. I'm using MS SQL Server 2005 Management Studio Express. I have atable that was created via an existing .sql file. Included were abunch of stored procedures. I went in to re-format these procedures.(They were written in haste by another programmer. It is my task to goback and improve their readabilities.) However, I am having difficultyfiguring out how to save the changes to these stored procedures. Thusfar, I have been individually saving each stored procedure in itsown .sql file. This is obviously not the way to go... but it's atemporary solution (so as not to lose the changes I have made todozens of procedures).Can someone please explain to me how I commit these changes to thedatabase?Thanks,Allie

View 1 Replies View Related

Saving Changes In MDX

Feb 22, 2007

Hi,

I have written a report in Reporting Services 2005 which gets its data from a cube.

I want to edit the mdx generated by the Mdx builder in RS 2005, so I click on the "design mode" button to do this.

However, when i make the changes, i cannot save it. How can I do this?

Thanks,

Ashleys.

View 1 Replies View Related

Saving

Feb 1, 2007

Good day

Using vb 2005 express I have my grid veiw on the form and a icon to click to save my work.

But is there a passage of code I can write to pop up a message box to remind me to save my work when I close my form. Similar to ms office forms when you close they ask you if you want to save any changes.

Thanks

Rob

View 3 Replies View Related

Is It A Good To Replace SQL Script Files With XML Files?

Jul 23, 2005

I am thinking about replacing the INSERT data scriptfiles that I have with XML files. This way I can open the XMLfile using an XML Editor and see the values in a GRID andmake changes easier.Do you see any problem with this approach?I managed to put together some code that is exportinga SQL table with its data to an XML file and also a codethat reads the XML file's data and inserts it into a table.Now I am researching on XSD, td:datatype, DTD...(I am new to XML) in order to figure out how I canuse a single xml file that will hold both the sql serverfields, the datatypes and their values.If you have links to some sample code that has anythingto do with the datatype export and import I am workingon, can you please share them with me?Most importantly what do you think about the idea of usingXML files vs sql scripts?Thank you

View 4 Replies View Related

Integration Services :: Converting RTF Files To PDF Files?

Jun 25, 2015

I have a scenario where I need to convert RDF files to PDF files? may I know is this achievable in SSIS - writing C# code?

View 6 Replies View Related

Saving Pictures

Sep 13, 2006

Is it better to have users that upload pictures have them saved to SQL server or to a folder?  I have a site where users enter things that they own (and each item has a unique id) and now I would like to add the functionality to add a picture.  I am sure I should use the fileUpload control, but should this save to a folder created for each user or to the SQL record itself?  Or possibly a separate SQL table just for pictures?Thanks for the help.

View 1 Replies View Related

Saving Date Into SQL

Nov 6, 2007

Hi,
      I want to save date into SQL server pls help me how to save this date into server. its give me syntax error that converting datetime to character string. and also I want to save date only in mm/dd/yy format in a sql not including time.
The following code I am using
  sub SaveEvent(sender as object, e as EventArgs)         Dim dt As DateTime = DateTime.Parse(eventdate.Text)
         lbl.text=dt   dim con as new SQLConnection("server=london-home; Database=tony; uid=rashid2; pwd=test; ")
      dim cmd as new SQLCommand("insert into events values('" & dt & "','" & desc.text & "')",con)           con.open()     cmd.executenonquery()   con.close()       end sub 
 
 
 

View 13 Replies View Related

SQL For Saving A Value In A Variable

Jun 15, 2008

 Hello Im having a little problem getting some values from a database.....
What I need is to get the value of the keyfield of the last entry introduced, I know how to to do the SQL statement for this, the problem is that i dont know how to save this value in a variable. I need to save this value in a variable in the session object or in a hidden field, and then use this variable in another different page. That's way i need to save this ID value, later in the other page I introduce data in a different table and one of the fields has to be this ID value which I have as a foreign key in the table so I need to use the same value in all the rows i introduce(Id value).
If you know how to accomplish this let me know, many thanks, Sergio

View 6 Replies View Related

Saving Values

Aug 10, 2007

Hi All
2 post in a row first time in ages so i must be getting better but i get stuck on crappy little things like this hopefully
I have data in the following format
4.1399999999999997
4.2400000000000002
5.4800000000000004
5.1799999999999997
6.7699999999999996
i want to select the data as such
4.13
4.24
5.48
5.17
6.76
I keep chasing my tale on this one around and around any one got a simple idea i am missing, you would not believe how much time i have spent on this.
Cheers
Phil

View 15 Replies View Related

Saving In Database

Sep 12, 2007

Hey Guys need your help please!

we are now on our second week back log...

database file is not full and not limited to growth. As a matter of fact batch transactions are done but our proble is very slow. 28 records has been successfully save after 45 mins. Before it's just 5 minutes. Then some other process are not working. Is there anything that I must do? We have 460 tables in our software using SQL server 2000 and our application is using VB 6.0

View 3 Replies View Related

Saving HTML To Sql

Oct 25, 2007

hello,

Im not really sure if this is the right thing to do. But i want to save a copy of the html from my invoice to sql so that i can keep a history of the invoices in case their are changes done to them. Anybody know what would be the best way to do this?

Thank you,

~ Mauricio

View 3 Replies View Related

Saving Backups

Feb 18, 2008

my backups are huge.. my database is huge

is there anyway of saving each month and incremental backup - like only that months info and changes and not all the previous months?

what do you normally do when the backup gets real large?

View 7 Replies View Related

Saving .mdf Database

Apr 10, 2006

Hello,I use SQL Server 2005 Express and I would liketo save on db of mine...Have I only to save the .mdf and .ldf data fileor I need to stop some service or other programs?Can I use some utility to schedule this?ThanksM.

View 4 Replies View Related







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