.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Post New Web Links

merging two textfiles along with filename

Posted By:      Posted Date: September 14, 2010    Points: 0   Category :Sql Server
Hi Team, I wantto build a package which takes input from .txt files and write in abc.txt along wiht the file name so if input is file a.txt content is lksjklsslkjfksf sfjsdkjflsd file b.txt content is lksjklsslkjfksf sfjsdkjflsd  then output abc.txt should be a.txt lksjklsslkjfksf sfjsdkjflsd b.txt lksjklsslkjfksf sfjsdkjflsd   Please give me some suggsetion on how to do it its like inserting file name then data in the same column Regars, Eshwar    

View Complete Post

More Related Resource Links

merging multiple tables in a single dataset to single table


 i have a stored procedure which returns three tables to a dataset ..... now i need to merge all three tables to a single table from d same dataset 

like dataset1 has table1 table2 and table3 .... i want all the three tabels to be merged into dataset1 itself .... instead of three diffrent tables so that i can show all three table data in a single datagrid  as a compact data and combination of 3 tables from d single dataset.....

can some1 help me please.....

Merging PDF documents


I've generated some PDF documents.
But i like to merge all PDF documents to 1 PDF document, withouth saving it first.

So i would like to have 10 byes ans bound them together if possible...
But how?

Code i use right now:

////Then create new pdf file
            string strMime = null;
            string strEncoding = null;
            string strfileNameExtentions = null;
            string[] stream = null;
            Microsoft.Reporting.WebForms.Warning[] warnings = null;
            bytes = rep.Render("PDF", null, out strMime, out strEncoding, out strfileNameExtentions, out stream, out warnings);      


Office Services: Merging Word Documents on the Server Side with SharePoint 2010


Office 2010 and SharePoint 2010 include a new set of components called Application Services. These put a rich set of tools in a developer's bag for Office automation. We'll show you how to use Office OpenXML, Word Automation Services and SharePoint to build a simple application that merges separate status reports into a single document.

Manvir Singh, Ankush Bhatia

MSDN Magazine July 2010

Assembling Documents on SharePoint 2010 Sites by Merging Content from Excel, PowerPoint, and Word

This article describes a rich document assembly solution that takes Word 2010 documents, Excel 2010 documents, and PowerPoint 2010 documents and merges them together to form a final report in Word. It does all of this from a SharePoint 2010 Web Part.

using CompositeCollection in ListBox for merging two Typed DataTable

Hi i have a Typed DataSet contining two DataTable : Table1 , Table2 i want to merge the two Tables in a ListBox by using "CompositeCollection " , but this doesn't work <ListBox.ItemsSource> <CompositeCollection> <CollectionContainer Collection="{Binding Path = Table1}"/> <CollectionContainer Collection="{Binding Path =Table2}"/> </CompositeCollection> </ListBox.ItemsSource> i put also : public partial class Window1 : Window { public Window1() { InitializeComponent(); this.FillDataset(); this.DataContext = ds; //this.Resources.Add("mytable1", DataSet1.Table1); }   i want to confess i don't have a clear idea about referencing an object as a Typed DataTable. also if a want to Template my ListBox lique this :    <ListBox.ItemTemplate> <DataTemplate DataType="{x:Type myprog:DataSet1+Table1 }"> <StackPanel Orientation="Horizontal"> <TextBlock Text="{Binding Path=ProductName}" Background="AliceBlue"/> </StackPanel> </DataTemplate> <DataTemplate DataType="{x:Type myprog:DataSet1+Table2 }"> <StackPanel Orientation="Horizontal"> <TextBlock Text="{Binding Path=ProductName}&quo

SQL Reporting - Merging fields into document

Currently, we have a process setup that has a user create a merge in the application, then that merge is dropped into a .csv file onto the root of the c: drive of the individual's PC... they then take the .csv file and use macros within Word and run a merge process into a document template... (these are documents that are sent to the court for renewal of an expired legal process)..  I'd like to know if there is a better way of doing this? Is there a way of eliminating the .csv file and the merge process of Word, and keep everything within SQL and the Reporting services?  Any help in pointing me to the right resources for this would be appreciated. Thanks! jill

filename without directory

how to insert the exact  filename to the database without getting the full directory like c://something/something/filename  into the column 'Filename'     waitng for reply

Capture the xml filename and load in a table

Hey I am having folder which contains multiple xml files.Now I need to read the xml file name and write in a table. I follwed the steps which are in the following link. http://www.sqlservercentral.com/articles/SSIS/67871/ But I am getting data as well as. I need only the file name to be written in a table.

Merging overlapping data from two databases?

We are decommissioning an older server (2000) and are in the process of migrating all the DBs to a nice new server (2005). One particular database was backed up and restored to the new server, BUT not all applications were re-pointed at the instance on the new server, they were left pointing at the old instance on the old server. Result: We have almost an entire day where some data was inserted into one DB, and some data was inserted into another. I've been handed the task of getting the data that went to the old server onto the new one. I've re-backed up the Db and restored it as a separate instance on the new server and I've been able to compare the two.  The "old" instance has about 675 records I need to get onto the new instance. Problem: 1. Trying to avoid writing a separate query for every single table in the DB, comparing the old and new instances, and inserting.  "IS NOT IN" or something similar.  I could do that but I'm swamped with work.  This project was NOT on my to-do list yesterday, but lots of other stuff was.  Anything quicker available? 2. Identity: Since the new instance took up where the old instance left off, and the old instance carried on as if nothing had changed, almost every row in every table has PKs duplicated in the other instance, but relating to a different data set. Besides shooting the individual

Get the row position of the group? merging query?

Hello! I am using SQLS2005. I have two tables: Unit: UnitId int PK Title varchar UnitOption: UnitOptionId int PK UnitId int FK Title varchar Quote: QuoteId int PK UnitOptionId int FK Title varchar I want to create a scalar UDF that takes a QuoteId param and returns a varchar that contains the following description (pseudu): Quote.Title + '-' + Unit.Title + '-' + Unit.UnitId + /* Here is where my question is: If there are more than 1 UnitOption under this Unit, then return '-' + the UnitOption number under this Unit (i.e.) if under this Unit, there are 3 UnitOption with IDs 13, 17, 55 under the unit, and the current Quote.UnitOptionId is the 17 one, it should return 2. Which means I want to retrieve an ID of this row in the group. Else return '' */

Merging 2 crystalreport into 1

Alright, I have been search through the net to combine 2 reports into one. I know about the subreport but I can't merge them in my case.I have one report with data being added into the report at runtime and another report having images being added to it at runtime as well.I tried inserting both of them to another report as a subreport but I get nothing out of it. Its blank! I was wondering if subreports only works if the data are either static or being drag out from a database. Ultimately I want to export them as a single PDF. Here's my code. AllReadings report = new AllReadings();Graph graphReport = new Graph();report.SetDataSource(readings);graphReport.Database.Tables["Images"].SetDataSource(data);Combine cbreport = new Combine();Stream stream = cbreport .ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat);The cbreport holds 2 subreport. One being AllReadings and the other is the graphReport. Is there any other ways to combine them both together?

merging every 3 column in excel using macros

I would like to merge every 3 columns and so forth in excel. It will be as follow: Column A,B,C as one column continued with  D,E,F, and G,H,I, and so forth until say KU,KV,KW. please let me know how to create the macros to select and then merge it. Thank you

Error: Internet Explorer Cannot Download FileName from WebServer

I am trying to display documents (.Doc / .PDF) through my web page.The code works fine in FireFox, but gives an error message on IE 6.0 / 7.0 / 8.0 Context.Response.Buffer = true;Context.Response.Clear();Context.Response.BufferOutput = false;Context.Response.ContentType = File.GetContentType(File.FileName);Response.AppendHeader("Pragma", "public");Response.AppendHeader("Cache-Control", "max-age=0");Response.Charset = "";Context.Response.AddHeader("content-length", File.FileData.Length.ToString());Context.Response.AddHeader("content-disposition", File.GetContentDisposistion(File.FileName)); Context.Response.BinaryWrite(imageFileBase.FileData);Context.Response.Flush();Context.Response.End();

How to show a message box on an invalid filename entered while saving a file using save file dialog

Hi all i have written a code to display a message box if invalid characters are entered while saving the file but my message box is not displaying. Actually i will have a save file dialog option to save a file if the filename starts or consists of the following    \\/:*?<>|"  I would like to display a message box as invalid or illegalcharacters in file My code is as follows    Stream myStream;                          SaveFileDialog saveFileDialog1 = new SaveFileDialog();                            saveFileDialog1.InitialDirectory = @"C:\";                          saveFileDialog1.DefaultExt = "txt";                          saveFileDialog1.Filter = "(*.txt)|*.txt";                          saveFileDialog1.FilterIndex = 2;                          saveFileDialog1.RestoreDirectory = true;                            if (saveFileDialog1.ShowDialog() == DialogR

Get filename HttpWebRequest

I'm downloading some files with HTTPRequest, following this tutorial http://www.geekpedia.com/tutorial179_Creating-a-download-manager-in-Csharp.html However, how do I get the filename? I need to get the file name in order to save it, because I don't know the extensions of the files.   PS: I asked this question in the wrong place : http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/f3be4bbb-8025-4b1f-a2dd-b1b70b071bc7 Sorry to ask again here (in the right place)Get a life. Go party!

A GUID might be prepended to the filename of the log file



Problem Definition:

I have an asp.net application when i am using microsft enterprise library for logging v4.1.

I found that a guid is added to the name of my file. I did googling and came to know that because of the following reasons it  is happening:

A RollingFileTraceListener instance "owns" the log file it is writing to and locks it for exclusive write access when it writes the first log entry. It keeps the file locked until the instance is disposed. If another RollingFileTraceListener  instance is created that points to the same file, before the first instance is disposed, the second instance cannot open this file for writing and will write to a new file with a GUID prepended to its name.

So my question is how i can overcome this issue?

Please do reply. Thanks in advance.

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend