Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    MS SQL Server


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





File..Save Copy Of &&<package File&&> As... Not Available


According to the help for SSIS, one method of deploying an SSIS package
to a SQL Server, 
http://msdn2.microsoft.com/en-us/library/ms137565.aspx, is to use the
File...Save a Copy of <package file> as... menu option. 



I don't have that menu option at all.  And yes, the package is in
focus.  My save menu options are simply; Save Selected, Save
<package file> As... and Save All.



I am using Version 9.00.1399.00 of the SSIS Designer.



At one time I did have the Management Studio's CTP installed. 
However it was uninstalled before installing the tools from the
Standard Edition.  (it would seem like not completely however)



Your help would be greatly appreciated.  Thanx much.





p.s. Almost forgot to mention... I am already aware of using the
DTSInstall utility as a workaround.  It should be noted, however,
that despite enabling the "CreateDeploymentUtility" property, the
DTSInstall.exe is not copied to the binDeployment directory.




View Complete Forum Thread with Replies

Related Forum Messages:
DTS Migration Wizard Failed To Save Package File -with Error 0x80070002 - Th System Cannot Find The File Specified.
Hi,

I use the DTS 2000 Migration Wizard to migrate one of the DTS 2000 packages to SSIS.  The migration failed with the following error message:


LogID=17
#Time=6:31 PM
#Level=DTSMW_LOGLEVEL_ERR
#Source=Microsoft.SqlServer.Dts.MigrationWizard.Framework.Framework
#Message=Microsoft.SqlServer.Dts.Runtime.DtsRuntimeException: Failed to save package file "C:Documents and SettingsfuMy DocumentsVisual Studio 2005ProjectsKORTONKORTONProcessCubesMF.dtsx" with error 0x80070002 "The system cannot find the file specified.".
 ---> System.Runtime.InteropServices.COMException (0xC001100E): Failed to save package file "C:Documents and SettingsfuMy DocumentsVisual Studio 2005ProjectsKORTONKORTONProcessCubesMF.dtsx" with error 0x80070002 "The system cannot find the file specified.".

   at Microsoft.SqlServer.Dts.Runtime.Wrapper.ApplicationClass.SaveToXML(String FileName, IDTSPersist90 pPersistObj, IDTSEvents90 pEvents)
   at Microsoft.SqlServer.Dts.Runtime.Application.SaveToXml(String fileName, Package package, IDTSEvents events)
   --- End of inner exception stack trace ---
   at Microsoft.SqlServer.Dts.Runtime.Application.SaveToXml(String fileName, Package package, IDTSEvents events)
   at Microsoft.SqlServer.Dts.MigrationWizard.DTS9HelperUtility.DTS9Helper.SaveToXML(Package pkg, String sFileLocation)
   at Microsoft.SqlServer.Dts.MigrationWizard.Framework.Framework.StartMigration(PackageInfo pInfo)

Looking at the call stack, it looks like COM wrapper fails on SaveToXML.  Can someone tell me how I should workaround this problem?

Thanks,

Bobby Fu

View Replies !
Save DTS Package To File?
I have a server with MSDE 2000 installed onto it.  I also installed SQLEXPR_TOOLKIT.EXE .  Now there is a DTS package present on that server saved in the DB.  How can I alter that package?  And if that's not possible: how can I save the package to a file so I can transfer that file to my development machine?
 
Thanks in advance,
 
Stijn Verrept.

View Replies !
Failed To Save Package File
I am just beginning to work on an ETL project at a new client site using their computers. They are an IT department new to SQL Server. We have SQL Server 2005 up and running, no probkem. But I get that error when I try to add a new package to an SSIS project. The error number is 0x8002801D "Library Not Registered". I did see the post about the MSXML DLL files and when I try to load an existing package I get 3 errors regarding XML - stating that the MSXML binaries may not be installed or registered properly. I searched and found the MSXML3 & 6 DLLs but the MSXML4.DLL appears to be missing. If I repair the installation, will this fix it? BTW - the MSXML 6.0 Parser did show as being installed in Add/Remove Programs.
 
Thanks for you help!

View Replies !
Deployment Package Failure - Could Not Copy File
Trying to build a deployment package. I have a number of dtsx in a project that share a connection config file. When I build, the error states: 'Could not copy file "whatever.dtsconfig" to the deployment utility output directory. ... The file already exists'
 
What am I doing wrong?

View Replies !
Save Some Stored Proc In File And Create SP From File
Every day we are restoring prod DB in Development  env. I need to save before restore users stored proc, 

restore DB and after create SP from file.

Thanks.

 

View Replies !
Copy Data To Excel File Using Dts Package In Sql Server 2000
Friends
 
Any one of you share your knowledge how to transfer data from a database to  a excel using dts packages in sqlserver 2000.
 
I want clear steps how to create a dts package
 
Appreciate your help
 
Thanks
satish

View Replies !
Save Copy Of Package Option Missing
On my workstation the option is there, but on a couple other workstations that option is not available from the file menu.  I tested doing the exact same thing and the option just isn't there.  Anyone have any idea's?

View Replies !
Save Copy Of SSIS Package To SQL Server Problem
Hi,

I never experience problems when saving the package to the server. The problem arises when I try to execute the package.

My setup is like this: I create packages in Visual Studio Business Intelligence Studio, and save copies of these to the SQL Server (the msdb database). On the server I create SQL Server Agent Jobs that run these packages.

When I do some changes to the package in Visual Studio, or even when I don't make any changes to the package at all, I am suddenly unable to run the package. I get the error message referring to "product level insufficient blah blah blah" which I have seen many people write about.

The last time this happened I had to move my packages to another folder in the msdb database. The packages were to be moved from the root folder to a folder specific to the project that I'm working on. I deleted the old packages (since there wasn't a method of moving it by using the Management Studio), and saved new copies of the packages to the server. Then I updated the steps in the sql server agent jobs that executed the packages, and the job suddenly failed.

I always manage to get it up and running again, but never until after I have deleted the agent job, the package, and created the agent job from scratch again (most often I rename the step that executes the package, but I don't know if this is the cause of error (is there a naming conflict here perhaps?)). Even then it may sometimes not work immediately, and I have to fiddle around with the options for the agent job, and eventually it will work.

I have never really figured out what is causing this problem, and it's annoying the hell out of me and the people on my team.

After having worked with Integration Services now for some months, it seems to me that a small change to the setup, or package contents can make the whole Integration part of the project not being very integrated with the rest of the solution. Probably it has something to do with my short experience with the Integration Services technology.

Has anyone else experienced these kinds of problems, and is anyone able to shed some illuminating light on a possible cause for them?

Looking forward to your comments :-)

View Replies !
Error Creating Package - Failed To Save Package File &&"... Emp EmpD4B.tmp&&" With Error 0x80040154 &&"Class Not Registered&&"
I had just installed SQL 2005 dev on my laptop and got an error message when I tried to create a package using the BI IDE. I received the same error using VS2005 IDE. But the project was created regardless without any packages. When I tried to create a new package in the project, I received the same error again, but with an option to view the error details.
 
Following is the text of the error details:
 
TITLE: Microsoft Visual Studio
------------------------------
 
Error creating package
 
------------------------------
ADDITIONAL INFORMATION:
 
Failed to save package file "C:Documents and SettingsmyoungbloodLocal SettingsTemp mpD4B.tmp" with error 0x80040154 "Class not registered".
 

------------------------------
 
Failed to save package file "C:Documents and SettingsmyoungbloodLocal SettingsTemp mpD4B.tmp" with error 0x80040154 "Class not registered".
 

------------------------------
BUTTONS:
 
OK
------------------------------
I found a similar post that suggested that they try the following:
 

regsvr32 msxml3.dll
regsvr32 msxml4.dll
regsvr32 msxml6.dll
 
But msxml6.dll could not be found.
 
I did get a copy of this file from a coworker, and after copying it and registering it, I was able to add a package to the project.
 
My concern now is what is the likelyhood of this being the only file missing from the installation.
 
I'm wondering if I should reinstall, or (if it exists) do a repair on the installation.
 
Thanks.
 
Marshall

View Replies !
Batch File To Copy File And Append Date
The Sql Server database can only see the local drive.

I would like to set up a batch file that will copy a SQL Server

backup file from the local drive to the network drive. I would

like to append the file date to the end of the copied file. I

assume a batch file can accomplish this but I am new to batch

file writing. Does anyone have code that they already created

for this sort of task??

Thank you!

View Replies !
Check File Date And Copy File
Hi,

 

I need to set up create a package so that I could check the date of the files posted in a folder, e.g. H:source.  If there is no file created later than one day exists, then continue to check again one hour later.  If files do exists, then copy then to c:dest and then upzip the files.  Once this is done, sent an notification email to user@mydomain.com.

 

Thanks,

 

View Replies !
BUG: Integration Services Project-can't Click On &&"save Copy Of Package As...&&"
Hi.

I found a possible bug.  If I open/create a new Integration Services Project and then try to save a copy of the package to SQL Server I found that for the option to "save Copy of Package As..." is only available if I am in the package itself.  If I click (highlight) on the package in the Solution explorer and then click on the File tab, the "save Copy of Package As..." option is not available.

I hope that I explained this well enough.

thanks.

View Replies !
BCP File Save
I am using the command below to save the flat file.
If I want to save it on some other computer on the network.
What modificationj i have to do in that if my computer name is HOST1.

Select @cmdstring = 'bcp armaster..t2 out c:efsest' + @filename + ' -c -t"|" -r -Splatinum -Usa -Ppassowrd'

exec master..xp_cmdshell @cmdstring

Thanks,
Harish

View Replies !
BCP File Save
Whenever i try to run the this program..its gives the follwing error
========
(1 row(s) affected)


(1 row(s) affected)


(1 row(s) affected)

output
----------------------------------
DB-LIBRARY error:
Bcp: Unable to open host data-file

(2 row(s) affected)

========

Declare @cmdstring varchar(255)
Declare @filename varchar(32)
DECLARE @v datetime

SELECT @v = GetDate()

select @filename = 'XAPIALTMKT'+CONVERT(varchar, @v, 112)+ SUBSTRING(CONVERT(varchar, @v, 108), 1, 2)
+ SUBSTRING(CONVERT(varchar, @v, 108), 4, 2)+
SUBSTRING(CONVERT(varchar, @v, 108), 7, 2) + '.TXT'


Select @cmdstring = 'bcp GM_TEST..XXAP_ALTRA_MARKETING_V out c:efsest'
+ @filename + ' -c -t"|" -r -S -Usa -Ppassword'

exec master..xp_cmdshell @cmdstring

View Replies !
Save To XML File
i'm trying to save data to an XML file from an OLE DB source using the "For XML" clause in the SQL command.  Do I need to use a flat file connection manager or a raw file connection manager?  And what destination do I use?

View Replies !
Able To Use On Any PC; Save DB As File
I haven't downloaded nor installed it but I have some general questions about it:

*Can I store a SQL Server-Express Database as a file, so that the Users can easily back it up or use my application as a portable one
*Do the enduser have to install SQL Server Express or any addition when I'm programming for the .Net Framework 3.5?

I'm looking forward to your answer!

View Replies !
Image File Save To DB
How to save image file to database?
Which control use best?

View Replies !
Save Any File Into A Table
I have a asp.net application where i can choose to save any file(could be jpg or dat or txt or xml etc etc) into a table.So far,i've manage to save it into an SQL server table in a column(set to Image datatype).But when i get the data from the table,put it into a byte array and recreate it.I notice that the files can be recreated correctly if they are of type .txt files.But jpg files can't be recreated and trying to open the jpg files gives an error.I don't think it is the file saving that is the problem since any files can be save.Rather it is the file recreating that is the problem.Can anyone help?

View Replies !
How To Save A File In SQL Server
I have the need to allow a user to upload a file via the web and then save it into a database. THen I also need to be able to retrieve the file for download.

Can someone give me guidance as to code or a sample on how to do this.

Thanks.

View Replies !
Save File When Report Is Run
Is it possible to save a report as a CSV when the report is run without the user having to export the file?  I need to save the report to a server location without the end user having to specify where.

View Replies !
Regarding File Save As(6th March)
Hi,All,
How can i save one file from one location to other location(save as) using Asp.Net code.
Any body pls send Source code.
Regards

View Replies !
Save To External File
how do i write a select query which will return all my data into an excel file or an xml file or txt file?
 

View Replies !
How Do I Save Xml File To Sqlserver
hi all.
i have a simple table with 2 fields:
1. name
2. file
i have an xml file ->  zz.mxl
how do i save this file to the db in a stored proc?
how do i call this from ado.net?
 
 

View Replies !
How To Save A Gif Or Jpeg File?
Need advise on how to save objects like this in a sql2005 database, so they can be rendered to users thru a gridview control.  Heard of saving a reference to location, but wondering if the entire object can be saved and served up with it's related data. 
 
Thanks for your time.

View Replies !
Copy A Database With Copy The .mdf File And Attaching It With A New Name?
Hello,

if i have a given database (a model) and i want to copy this database in the same database instance. Is it ok to copy the mdf and ldf file and attach the files with a new database name in the same instance.

Or is the datebase name part of the .mdf file?

Regards
Markus

 

 

 

View Replies !
Save File Into The Sql Server Database
Hi,
I want to upload a file (e.g. .xls, .pdf, .doc) and save into the Sql Server 2000 database through the web interface, and then to download this file. Any idea???

View Replies !
Save SQL XML Field Type To A Xml File
Hi, I have a table which holds raw xml in a field with type XML. How do I export that XML field to an XML file? Thanks Bones 

View Replies !
Upload And Save A PDF File Into MS SQL Databse
Hi guys,
 I want to update a PDF file and store it in the MSSQL database. (I know it is better if I save the file on server and just store the link to it, but I have to store the file on the database "Project Requirements")
I would probably use FileUpload control to upload the file. but would I upload it to server temporarly and then save it or would I just upload it to DB.
I appreciate your help and suggestions and any tips & tricks or issue that I have to consider.
Regards,Mehdi

View Replies !
Save To File In Profiler Does Not Work
Hi,
I have 2000 and 2005 dev on my xp desktop
profilers will not allow save trace to file ,just to table.

is any setting or registry I can check ?

Alex

View Replies !
Save Results Of Query To CSV File
I want to write a small program (maybe just a stored procedure) that will save the results and column names of a simple query to CSV file. This will then be copied onto disk and distributed to user who'll use Excel or a similar package to open the CSV file.

Any suggestions as to the best way to achieve this? I was considering using a view and then BCP but I have problems then when trying to open the CSV file in excel (or other spreadsheet package). Doesn't like the datatypes and so on.

Is there a simple way to do this? And is it possible to save the results in such a way that Excel will choose the right datatypes for the columns. (not convert varchar's like '000122' to numbers.)

View Replies !
Save Database E-R Diagram To File
HI,
I was wondering if it is possible to save the database E-R diagram to file in
MS SQL server 7?

Regards
Guy

View Replies !
How Can You Save Data In Tables But Not In The Log File?
Hi All,
 

I'm developing a credit card application, and would like to store some sensitive data in a table temporarily, but be absolutely positive it either never goes into the log file in the first place, or is securely deleted from the log file when I delete the data. There's millions of other bits of data in the log, so truncating or otherwise disposing of the whole log is not an option.
 
In particular, I'm capturing the credit card mag stripe at the beginning of a transaction, and saving it while the work is done to complete the transaction. (ie, a pilot walks in, says "Top off the G4 with JetA, here's my card, have it ready when I get back.") We want to save the swipe info for maybe a couple of hours (it is encrypted during this time), use it for the authorization, then throw it away as per credit card industry rules.
 
Is there any way I can save the encrypted text string in a normal MSSQL field (Varchar(200)), have it stay around for a few hours as the user logs in and out of the database, then delete the record and be sure it's nowhere in the log?
 
TIA,
George Lehmann
Horizon Business Concepts, Inc.
Broken Arrow, OK

View Replies !
XML Configuration File : How To Save Password?
 

Hm... I use SSIS packages to manipulate some data from one SQL server to another. I chosed "DontSaveSensitiveData" and I am using a XML configuration file.
 

The problem is I have to edit the file with notepad manually and add the password for my SQLconnections in it.
 

Is it possible to do this from the Business Intelligence Studio instead?
 

I tried to edit the connections and set and save password there but it won't save it to the XML configuration file.
 

Or perhaps it is intended to be edited in notepad and passwords set manually to it?

 

View Replies !
Load Or Save Last Version Of A DTS File
Microsoft,
 
We need some help to resolve an issue. We want to load and save the last version of a DTS File but using this command:
 
EXEC @rc = sp_OAMethod @object, 'SaveToStorageFile', NULL, @Path_Log_Save_DTS
 
we always get all versions of the DTS File. Could you help us to Load or Save only the last version of the file? Is there any option of this procedure sp_OAMethod (or other) that solve the problem?
 
Thanks,
 
Regards,

View Replies !
Save File In SQL 2005 Database
Hello,

I am working on a ASP.NET 2.0 project with an SQL 2005 database.
I created a documents table with various columns including:
DocumentId and DocumentUrl

My documents will always be PDF's of SWF's (Flash Paper Files)

I will need to display this files in my web pages.

My question is:
Should I save the DocumentUrl in the database or should I save the file itself in the database?

And how can I save files in an SQL 2005 database?

Thanks,
Miguel

View Replies !
How To Save SQL Output As EXCEL File?
I would like to create a SQL job that runs a basic query monthly and saves the results as a .xls file and emails the results to a user. I've been unsuccessful with sp_send_dbmail in that the output file is always a single column. Any suggestions?

Thanks, Dave

View Replies !
Save Result To A Text File
Want to save the result of a query in sql server express to a text file or any other file.

anujahanvi

View Replies !
File Upload And Save In SQL Server Problem
1) Is it possible to have File Upload Code into Datagrid ??

2) What is better -------- to have Upload and save File in SQL Server !! Or Store the Path for the file (word, pdf or image) into SQL Server ??

3) If I am using a stored procedure, how can I upload file using stored procedure ??

View Replies !
Save The Bcp Output In A Text File To Check It Later
Hi I am using bcp command to export data from a table to a text file. I want to be able to save this output from bcp into log.txt how can I do that.


this is the output that I need to save it , If I run the bcp command from sql window, this output is shown in the result window, but I need to save it in a text file in c:
thanks for your help

Ali

output NULL
Starting copy...
1000 rows successfully bulk-copied to host-file. Total received: 1000
1000 rows successfully bulk-copied to host-file. Total received: 98000
1000 rows successfully bulk-copied to host-file. Total received: 99000
1000 rows successfully bulk-copied to host-file. Total received: 100000
NULL
100491 rows copied.
Network packet size (bytes): 4096
Clock Time (ms.): total 85143 Avg 0 (1180.26 rows per sec.)

(106 row(s) affected)

View Replies !
Please Save Me. (File Get Deleted In SQL Server, How To Restore?)
Hi All,

In SQL Server 2000(Sql Query Analyzer), I had opened a main program file for debugging purpose.

Somehow by mistake its entire contents get replaced/deleted.

I don't have the backup.

I would appreciate anyone who can save me by advising to restore this program.

View Replies !
Read CSV File - Save Columns Into Rows
 I want to import CSV file and convert columns into rows depending on Customer count(2nd record in each row of CSV file) and save to SQL table

--CSV file format
State, Customer_Count, Name_1, Total_1,Name_2, Total_2,Name_3, Total_3..can go upto 600

GA,2,'John Doe',14.00,'Roger Smith',15.00
FL,3,'John Doe',14.00,'Roger Smith',15.00,'Sally Cox',16.00
SC,5,'John Doe',14.00,'Roger Smith',15.00,'Sally Cox',16.00,'James Brown',17.00,'Rick Davis',18.00

Data in SQL table from csv file should look like this

State,Name,Total
GA,John Doe,14.00
GA,Roger Smith,15.00
FL,John Doe,14.00,
FL,Roger Smith,15.00
FL,Sally Cox,16.00

I have multiple CSV files with millions of records. How can i achieve this using Integration Services or Bulk Data Import.

 

 

View Replies !
Different File Save Location When Used As A Scheduled Job Than In VS2005
I have an SSIS package that I created that looks like the following:

Execute SQL Task  [Determines the file name]

Data Flow Task
     Source - Query  [Grabs the data]
     Destination     [Saves data to file on network drive]

Send Mail Task       [Tells user to get file from network]
When I run this package inside Microsoft
Visual Studio I get the results I want.  It sends the file to the
network drive and because there are SSN's in the file, it doesn't
actually e-mail the file but puts it in a secure location for the
person to get the file.  

When I schedule this in SQL Server 2005 I get the file saved to: c:windowssystem32dynamicfilename.csv

So somehow it is still able to determine what the file name should be, but instead of sending the file to the right destination when you run it through VS, it flops out and sends it to this wacky directory.

I've
spent too much time on this and was wondering if someone can point me
in the right direction without going to the extent of writing a script
like this suggests.  thread1555-1265108

Thanks,
Keith

View Replies !
Save Input Flat File Names.
Background:
 

I am new to SSIS.

I have a data flow task within a For Each Loop Container.

Its reading a Demilited Flat File and inserting into a DB table.
The Flat File Source reads a specified folder and picks up all files with extension  .txt
 
Question:
 
How can I record and save the file names the package picks up and loads it in ?
 
For eg:
If I have under C:Test folder
File1.txt
File2.txt
File3.txt
 
And the package picks up all the files above and loads them in, is it possible to read the file name its processing ?
I have a need to read these file names ( in this example File1,File2,File3 ) and store them in a DB table.
 
Appreciate your help.
Thanks in advance.
AkB 

View Replies !
Sql Task To Save Query Results To File ?
In sql mgt studio, I can save the query results to a file.  How would I do this in an SSIS package?

View Replies !
How Can I Save Big File To NVARCHAR(Max) Column In The Database?
helo..
 I want to save file it size about 200MB to the database and after that

I want to get it from the database, the colmun type that i want to

save the file to it is NVARCHAR(Max).

I am using MS sql server 2005.

I was using this code to do this with Image Or Ntext column type but

it dose not working with NVARCHAR(Max) column?

 

 

Function SaveFileToDB(ByVal FileName As String, ByVal TblName As String, ByVal FldName As String, ByVal ColumnIDName As String, ByVal RowID As String) As Boolean

Try

Dim addEmp As SqlClient.SqlCommand = New SqlClient.SqlCommand("SELECT @Pointer = TEXTPTR(" & FldName & ") FROM " & TblName & " WHERE " & ColumnIDName & " = '" & RowID & "'", MyConnection)

Dim trParm As SqlClient.SqlParameter = addEmp.Parameters.Add("@Pointer", SqlDbType.Binary, 16)

trParm.Direction = ParameterDirection.Output

addEmp.ExecuteNonQuery()

'''''''''''''''''''''''''''''''''''''

Dim bufferLen As Integer = 1048576

Dim appendToPhoto As SqlClient.SqlCommand = New SqlClient.SqlCommand("UPDATETEXT " & TblName & "." & FldName & " @Pointer @Offset 0 @Bytes", MyConnection)

Dim ptrParm As SqlClient.SqlParameter = appendToPhoto.Parameters.Add("@Pointer", SqlDbType.Binary, 16)

ptrParm.Value = trParm.Value

Dim photoParm As SqlClient.SqlParameter = appendToPhoto.Parameters.Add("@Bytes", SqlDbType.Image, bufferLen)

Dim offsetParm As SqlClient.SqlParameter = appendToPhoto.Parameters.Add("@Offset", SqlDbType.Int)

offsetParm.Value = 0

Dim fs As IO.FileStream = New IO.FileStream(FileName, IO.FileMode.Open, IO.FileAccess.Read)

Dim br As IO.BinaryReader = New IO.BinaryReader(fs)

Dim buffer() As Byte = br.ReadBytes(bufferLen)

Dim offset_ctr As Long = 0

Do While buffer.Length > 0

photoParm.Value = buffer

appendToPhoto.ExecuteNonQuery()

offset_ctr += bufferLen

offsetParm.Value = offset_ctr

buffer = br.ReadBytes(bufferLen)

My.Application.DoEvents()

Loop

br.Close()

fs.Close()

Return True

Catch ex As Exception

MyErrStr = ex.Message

Return False

End Try

End Function

 

 

Public Function ReadFileFromDB(ByVal MyCommandText As String, ByVal FileColumnNumber As Integer, ByVal DSTFileName As String) As Boolean

Try

Dim command As SqlClient.SqlCommand = New SqlClient.SqlCommand(MyCommandText, MyConnection)

Dim stream As IO.FileStream

Dim writer As IO.BinaryWriter

Dim bufferSize As Integer = 1048576

Dim outByte(bufferSize - 1) As Byte

Dim retval As Long

Dim startIndex As Long = 0

Dim reader As SqlClient.SqlDataReader = command.ExecuteReader()

reader.Read()

stream = New IO.FileStream(DSTFileName, IO.FileMode.OpenOrCreate, IO.FileAccess.Write)

writer = New IO.BinaryWriter(stream)

startIndex = 0

retval = reader.GetBytes(FileColumnNumber, startIndex, outByte, 0, bufferSize)

Do While retval = bufferSize

writer.Write(outByte)

writer.Flush()

startIndex += bufferSize

retval = reader.GetBytes(FileColumnNumber, startIndex, outByte, 0, bufferSize)

My.Application.DoEvents()

Loop

writer.Write(outByte, 0, retval - 1)

writer.Flush()

writer.Close()

stream.Close()

reader.Close()

Return True

Catch ex As Exception

MyErrStr = ex.Message

Return False

End Try

End Function


 

View Replies !
How Do I Save A File From The Report Viewer Control
Hi,

  How do i save the file when the user clicks on export to Pdf in the report viewer control?

 

Regards,

Karen

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved