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

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

how do i create a schema.ini file from a tab delimited file?

Posted By:      Posted Date: September 14, 2010    Points: 0   Category :ASP.Net
Hi there,How do I create a schema.ini file from a tab delimited file?I have this so far:[myFile.txt]ColNameHeader=TrueFormat=TabDelimitedCharacterSet=ANSII think I need something like this after my last line from above:Col1=first TEXT width 150My text file has 7 columns, the first row is the header row. The data comes from a Micosoft SQL Server Database where the fields are of the following types:intnvarchar(MAX)nvarchar(50)Many many thanks,Kiley

View Complete Post

More Related Resource Links

How to Create a Table from XML Schema File (.xsd) in SSIS 2005

I have a .xsd schema file from an Informix table. I want to create the same table in the SQL Server 2005 using SSIS 2005. Is there any work arround that i can do this from a file?
If could do this using any other SQL Server 2005 file Objects.

Immidiate Help would be appriciated.

file upload in Create User Wizard Created User event with UpdatePanel Tag wont work?



In my Create User Wizard1 Created User Wizard Event, I am collecting extra information from text boxes and allowing

the user to uplad a file.



I have put the Submit button within an Update Panel Tag but since I have done this it does not work.

Is there a way round it. In this situation would you use a trigger.?


<br />

  <asp:UpdatePanel ID="UpdatePanel2" runat="server">

  <asp:Button ID="StepNextButton" runat="server"  CommandName="MoveNext"  align="middle"
                                            Text="Submit my Profile" />

VS2010 Express ASP.net and database file with SQL Authentication - How to create database file with


Hi, I have installed Visual Studio 2010 Express in my local system.

Steps 1. File->New Website

 2.Open datbase explorer, right click on dataconnection

 3.Select Create new connection

 4.use Microsoft SQL Server Database file

5. Type new databse filename

6. Now i want to use SQL authentication which is not working

 7.If we use windows authentication its wokring without any problem

8.But i need sql authentication to be used.

 9.I have not installed SQL studio.

 I am only using the one which is packaged in VisualStudio 2010 SQLClient. Let me know how can we create a new database file with userID and password. So that i can host it in other systems as well without any windows authentication.  I know that VS2010 setup also installs the SQL client which is requiredto create and manage sql databse files/quries etc


i dont know the default userID and password for SQLauthentication. As the express setup did not asked any credentials while installing SQL components


Thanks and regards

 Mahesh kotekar


Create excel file from Binary data on SqlServer



My requirement is that i upload an excel file then i need to validate that data.


1. Uploading file using using upload control saving binary in SqlServer

2. Then i am creating file from binary data  on Sql Server using below command and then using OPENROWSET to dump data to Sql table

3. Then reading Sql Table row wise and validating data.


Alter Procedure spUploadExcelFile
  @PKID int,
  @BatchID int


	Declare @VarBin varbinary(max)
	Declare @FileName varchar(100)
	DECLARE @sql nvarchar(MAX)
                DECLARE @errMsg nvarchar(MAX)
	DECLARE @ObjectReturn INT
	DECLARE @ErrorSource VARCHAR(255)
	DECLARE @ErrorDesc VARCHAR(255)
	DECLARE @ObjectToken INT

	Select @VarBin  = Content , @FileName = [FileName] from MultilangBinaryData Where PKID = @PKID
	SET @FileName = 'C:\'  + @FileName
	EXEC sp_OACreate 'ADODB.Stream' @ObjectToken OUTPUT
	EXEC sp_OASetProperty @ObjectToken, 'Type', 1
	EXEC sp_OAMethod @ObjectToken, 'Open'
	EXEC sp_OAMethod @ObjectToken, 'Write', NULL, @VarBin
	EXEC sp_OAMethod @ObjectToken, 'SaveToFile', NULL, @FileName, 2
	EXEC sp_OAMethod @ObjectToken, 'Close'
	EXEC sp_OADestroy @ObjectToken  
	SET @sql = 'INSERT INTO dbo.UserBulkData SELECT 0,NULL,'+ @BatchI

Create PDF file in server side

Hi,I need to create a .pdf file which can download by client clicking on the link in my web site. That pdf should be generated using stored information in database. It has different types of fonts which has not installed in client machine and only installed in web server. In this case, I'm not interesting to use crystal report or any other third party components that need to register to use and has some limitations.How can I do that using ASP.NET with C#?Thanks.

How to save form data to delimited file?

I tried searching, but maybe I was putting in bad keywords =\How do I go about saving form data into a delimited file?

How to create .asmx file

I have a web service project that was created using Visual Studio 2005. In the IDE I can see that there is an .asmx file, and a source code file for the web service. I had doubts that my .asmx file (Starpe.asmx) was reflecting my code changes, so I searched for the .asmx file using windows search and then deleted it with the intention of re-creating it through a rebuild. I can still see the .asmx file in the IDE, and my code works. However I selected the .asmx file in the IDE and then did properties. I went to the path where it said the file was located, but the .asmx file is not there?? asmx files from other web services are there, but not the Starpe.asmx file. So how do I rebuild/recreate the .asmx file? Sure it shows in my IDE project, but it no longer exists on my hard drive.    

Create excel file

Hi, I have create a webpart that's communicate with a oracle database. everything looks fine and works good. Now i want to add a button to create a excel file. I'm using Open XML SDK 2.0 but i get always a access denied when i create the excel. Here is some of my code // Create a spreadsheet document by supplying the filepath. // By default, AutoSave = true, Editable = true, and Type = xlsx.. SpreadsheetDocument spreadsheetDocument = SpreadsheetDocument.Create("excel.xlsx", SpreadsheetDocumentType.Workbook, false); // Add a WorkbookPart to the document. WorkbookPart workbookpart = spreadsheetDocument.AddWorkbookPart(); workbookpart.Workbook = new Workbook(); // Add a WorksheetPart to the WorkbookPart. WorksheetPart worksheetPart = workbookpart.AddNewPart<WorksheetPart>(); worksheetPart.Worksheet = new Worksheet(new SheetData()); // Add Sheets to the Workbook. Sheets sheets = spreadsheetDocument.WorkbookPart.Workbook.AppendChild<Sheets>(new Sheets()); // Append a new worksheet and associate it with the workbook. Sheet sheet = new Sheet() { Id = spreadsheetDocument.WorkbookPart.GetIdOfPart(worksheetPart), SheetId = 1, Name = "mySheet" }; sheets.Append(sheet); workbookpart.Workbook.Save(); // Close the document. spreadsheetDocu

i have a XML File how to create a Tree View and how to get & post xml to cgi

<?xml version="1.0"?><Hierarchy>  <HD id="Acct">    <SH id="Books">      <TRK id="Annual">        <TGT id="ABA.0001">Closure of accounts for 2009-10</TGT>      </TRK>      <TRK id="Monthly">        <TGT id="ABM.0003">Finalization of expense accounts for Jun</TGT>      </TRK>    </SH>  </HD>  <HD id="Admin">    <SH id="GH">      <TRK id="Eqpt">        <TGT id="AGE.0001">Shifting of BSNL Landline.</TGT>      </TRK>    </SH>    <SH id="Offc">      <TRK id="Eqpt">        <TGT id="AOE.0002">Routine Maintenance</TGT>        <TGT id="AOE.0003">Electrical Eqpt Procedures</TGT>      </TRK>     

problem with sitemap schema 'xsi:schemaLocation' in XML file creation

SqlConnection conn = new SqlConnection(connStr); conn.Open(); string sql = "select top 10 catnum,cast(case when isnull(onhand,0) < 5 then 0 else round((onhand/2),1) end as int) as onhand from dbo.V_OnHand with (nolock)"; SqlCommand cmd = new SqlCommand(sql, conn); XmlDocument doc = new XmlDocument(); XmlDeclaration dec = doc.CreateXmlDeclaration("1.0", "UTF-8", null); XmlElement rootNode = doc.CreateElement("inventory"); doc.InsertBefore(dec, doc.DocumentElement); rootNode.SetAttribute("xmlns", "http://seller.marketplace.tests.com/inventory/v1"); rootNode.SetAttribute("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"); rootNode.SetAttribute("xsi:schemaLocation", "http://sellersupport.domain.test.com/test1/s/schema/inventory/inventory-xml-feed-v1.xsd"); doc.AppendChild(rootNode); XmlElement fbm = doc.CreateElement("inventory"); doc.DocumentElement.PrependChild(fbm); SqlDataReader rdr1 = cmd.ExecuteReader(); while (rdr1.Read()) { XmlElement item = doc.CreateElement("item"); item.Set

How to Create Excel File Silently with ASP.Net & C#?

Hi there, I am using VS2005, ASP.Net with C#. Here is little situation; and trying to resolve 2 issues. 1.       I need to add dynamic drop down in certain Excel sheet column. 2.        I need to create excel file on the web server silently. Here is the code I am trying to use;        DropDownList dropdownList = new DropDownList();        dropdownList.Items.Add("Item No 1");        dropdownList.Items.Add("Item No 2");        dropdownList.Items.Add("Item No 3");        dropdownList.Items.Add("Item No 4");         //Create an Excel App        Microsoft.Office.Interop.Excel.ApplicationClass excelApp = new                     Microsoft.Office.Interop.Excel.ApplicationClass();        excelApp.Visible = false;         //Interop params        object oMissing = System.Reflection.Missing.Value;       &n

How can create site in sharepoint foundation 2010 based on WSS 3.0 template(.stp file)

Hi,   I  want  to migrate wss3.0  site into sharepoint foundation 2010 site . earlier we  were creating site based on .stp file  in WSS 4.0 . but now we  have   to build same site in sharepoint foundation 2010. I followed  the old way  intall the .stp file  and  based on that trying to create new  site  but getting some error  old version template is not supporetd my this version. how could  l able to create  site  in sharepoint foundation 2010 based on wss 3.0 template . Please help Thanks in advance Jandel Singh

How can create site in sharepoint foundation 2010 based on WSS 3.0 template(.stp file)

Hi,   I  want  to migrate wss3.0  site into sharepoint foundation 2010 site . earlier we  were creating site based on .stp file  in WSS 4.0 . but now we  have   to build same site in sharepoint foundation 2010. I followed  the old way  intall the .stp file  and  based on that trying to create new  site  but getting some error  old version template is not supporetd my this version. how could  l able to create  site  in sharepoint foundation 2010 based on wss 3.0 template . Please help Thanks in advance Jandel Singh

Create zip file of dyanamicaly generated Excel sheet in c#

hi all,   I want to give product details in excel sheet but that excel sheet should be zipped and then pass it to user. I know how to create excel sheet from database but  how to pass that excel sheet into folder and then zip that folder..?   plz giv me any solution 

How to create .sln file?

Hi Friends,         Can anybody explain me use of .sln file and how to create it for web-site project in asp.net.?          Whether it is created automatically or have to create on our own?Thanks in advance.

"File Not Found" Error when Trying to Create a New Page

I have installed SharePoint 2010 Foundation with a Server Fram Configuration (in order to integrate it with the installed SSRS). On top of the foundation, I have created a site collection on port 80 (with business intelligence template). The site collection is running fine, as I could add web parts and edit the default page, however, when I try to create a new page from "Site Actions -> New Page" and then I put a page name like "NewPage" and click on "Create" button, I get the following error message: +++++ START OF ERROR MESSAGE +++++ Error File Not Found. Troubleshoot issues with Microsoft SharePoint Foundation. Correlation ID: efcb0dde-66ea-46df-b3a1-59a9918f6cb4 Date and Time: 9/12/2010 11:50:41 AM +++++ END OF ERROR MESSAGE +++++ Other error messages when I create site within this site collection and try to edit their pages. The steps I followed to do so are: "Site Actions -> New Site" Select "Business Intelligence Center" and put a title and URL name, and then click on create. The error message I get when I try to edit the defaul page on these newly created sites: +++++ START OF ERROR MESSAGE +++++ List does not exist. The page you selected contains a list t

VS2010 Deploying Database Project - Error: Cannot create file [...]MSSQL10.MSSQLSERVER\MSSQL\DATA\m

I had SQL Express from a previous installation of VS2010. I uninstalled All SQL and VS2010 and re-installed VS2010 (without Express) and then re-installed SQL Server 2008 Developer Edition. Now when I try to deploy a database project I am receiving the following error:     Creating EDDY.Cheetah.Database.Server... ...\sql\debug\Server.sql(38,0): Error SQL01268: .Net SqlClient Data Provider: Msg 5170, Level 16, State 1, Line 1 Cannot create file 'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\mastlog.ldf' because it already exists. Change the file path or the file name, and retry the operation. ...\sql\debug\Server.sql(38,0): Error SQL01268: .Net SqlClient Data Provider: Msg 1802, Level 16, State 4, Line 1 CREATE
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