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

Post New Web Links

insert DATA sql in word template

Posted By:      Posted Date: September 15, 2010    Points: 0   Category :ASP.Net
hi everybody i'm looking for tutorial  to help me for a projecti have word template . i want to insert data from sql server data  base into this template .using asp.neti didn't found a good exemple in the internet to resolve my problemethanks for helpregards

View Complete Post

More Related Resource Links

Sharepoint 2010 List data to Word Template via Workflow


Ok, I am using Sharepoint 2010 and Designer as well as Infopath 2010. I have a requirement to send out a word document (via workflow) that will be a template that references fields from my Sharepoint List.

Any help is appreciated, I do not want to buy anything extra and a no-code solution would be best.


External Data Fields in a Word Template saved as a content type in a document library with multiple


I have created a Word Template for a Document Library that has an External Data Column in it of Client Name which also adds Client Address1, Client Address2, Client City, Client State, & Client Zip.  Now this works fine for a Document library with that template as the Template.dotx file. 

I want to be able to make a bunch of Templates and have them all as Content Types in one Library.  When I do this I cannot get the External Data Quick Parts to work.

Anyone have any ideas?

Insert data to Excel using OLEDB



I am trying to insert data to Excel Document using OLEDB as follows:-

 sql = "Insert into [MyFirstSheet$] (" + Title1 + "," +Title2 + "," + Title3 + ") 
values('" + Value1 + "','" + Value2 + "','" + Value2 + "')";
myCommand.CommandText = sql;

 sql = "Insert into [MyFirstSheet$] (" + Title1 + "," +Title2 + "," + Title3 + ") 

values('" + Value1 + "','" + Value2 + "','" + Value2 + "')";

myCommand.CommandText = sql;


But, the Title1 ,Title2, Title3 are in the 3rd row of the Excel Document. So, the data is not inserted.

How to insert Image (jpeg) into MS Word Programmatically using VB.NET


Hi there,

Can someone help me on How to insert Image (jpeg) into MS Word Programmatically using VB.NET..not C#.NET??? Sad

I could hardly find any articles for the coding. Preferably using Bookmark...can i have the sample code.



insert the data in database using gridview jquery



I want to use gridview and bind the data and after i want insert the data in database using jquery,

below the link i got for delete


but i want the sample example for insert  row from gridivew and add the database.


Insert data based on gridview user value on row.. how to



I have three column comes from database table(Table1) and one column is for entering data for the user let us consider it look like this 

ItemNo ItemName Qty  uservalue

001       A               50       20

002       A               20       5

003       B               50  

004       C               60      10

005       D               40 

006       E               90      15 


If its 300 row from database to gridview it will show 50 record with page navigation..

What i need is i need to insert data in to database table which gridview row has user value..

The output of the another table(Table2) will look like this after insert

ItemNo ItemName   uservalue

001       A                    20

002       A                      5  

review, edit and insert data using 2 diffrent database



is it possible to create a custom list in sharepoint designer to enter a vacation request and using a work flow that goes to the HR department. but when the HR department approve the request the HR can store these requested data into another database?

what i mean is, the employee fill a form in to request some vacation days using a custom list in my wss3 site. i assume that these data will be stored in the WSS_content database. now when the HR department get this filled form they have to store the data of the form in to a database but not in the WSS_Content database.

is this possible?

Insert Excel Data via File Upload into sql server database???

Hi all, I have requirement that User can Upload the Excel Sheet Data to sql server Database at once. How i do that Any Article or hint is apperciated.   Regards 

Get the controls from a TabItem's data template

Hello, I am using the following Style on a custom TabItem that I am using: <Style TargetType="{x:Type local:GSFTabItem}"> <Style.Resources> <cmn:EnumDisplayConverter x:Key="Converter" Type="{x:Type crys:GSFOperator}"/> <local:GSFTabVisibilityConverter x:Key="visibility"/> </Style.Resources> <Setter Property="DataContext" Value="{DynamicResource GSFObject}"></Setter> <Setter Property="Header" Value="{Binding Field}"/> <Setter Property="Content" Value="{DynamicResource GSFObject}"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type local:GSFTabItem}"> <Grid> <Border Name="Border" BorderBrush="Black" BorderThickness=".5,.5,.5,0" Background="White" > <StackPanel Orientation="Horizontal"> <Label VerticalAlignment="Center" HorizontalAlignment="Center" Content="{Binding Field}"/> <Label Content="X" IsHitTestVisible="True"

reading xml data and insert into database table

hi friends, .very urgent for me so only i send following script i create for read xml data and to import to table. i got result for reading xml and rows are added to table but the values are showing null pls clarify this problem. thanks alter procedure pizza_sales ( @xml xml ) as begin INSERT INTO pizza_xml (LOC_CODE, CUST_CODE, PRODUCT_ID, INV_TYPE, INV_NO, INV_DT, INV_QTY_IN_INV_UOM, INV_RATE_IN_BS_CURR, INV_VU_IN_INV_CURR, -- TOTAL_DISC_IN_BS_CURR, NET_INV_VU_IN_INV_CURR, NET_INV_VU_IN_BS_CURR, TOTAL_TXES_IN_BS_CURR ) select table1.column1.value('@LOC_CODE','nvarchar(75)'), table1.column1.value('@CUST_CODE','nvarchar(75)'), table1.column1.value('@PROD_CODE','nvarchar(75)'), table1.column1.value('@INV_TYPE','nvarchar(50)'), table1.column1.value('@INV_NO','nvarchar(100)'), table1.column1.value('@INV_DT','datetime'), table1.column1.value('@INV_QTY_IN_INV_UOM','numeric(28,8)'), table1.column1.value('@INV_RATE_IN_BS_CURR','numeric(28,8)'), table1.column1.value('@INV_VU_IN_INV_CURR','numeric(28,8)'), --table1.column1.value('@TOTAL_DISC_IN_BS_CURR','numeric(28,8)'), table1.column1.value('@NET_INV_VU_IN_INV_CURR','numeric(28,8)'), table1.column1.value('@NET_INV_VU_IN_BS_CURR','numeric(28,8)'), table1.column1.value('@TOTAL_TXES_IN_BS_CURR','numeric(28,8)') from @xml.nodes('pizza/pizzaxml')as table1(column1) end declare @id

pull data from table A and insert into the same table

Hi All, When I pull data from one table and try to insert into the same table, is it possible for any erroneous data loading? ex:   Insert Into TableA Select Cat,Bank, City, Act From TableA A CROSS APPLY (SELECT COUNT(ACT) AS TOT from TableA ) B   Thanks        shamen

How to insert values into my table the data is coming from inline table valued function

Hi all,   i have table oi want insert values into my table the data is coming from inline table valued function how i can use the inline table valued function to insert datainto my table i have inline function which out puts 3 collumns of data how i can insert this data into my table i have the insert statment like below insert into tablename(c1,c2,c3,c4,c5) select ('abc',....................,'xyz') how i can use the out put put of my inline function to  to insert data into my columns c2,c3,c4. please help me out Thanks & Regards Sunil Yoganna

hide column in insert template

Hello.  I would like to hide a foreign key column in an insert template.  It is auto populated with jQuery, and it would be great if this column was also hidden from view.  How is this done?  Thank you. 

Basic data type problem with database insert

Hi,I'm trying to write some values into a database, but I think there's an issue with the data types.  Here's what I've got: public static string Hello(string pageId, string inOut) { string itemId = ""; string period = ""; var cookie = HttpContext.Current.Request.Cookies["visitorGUID"].Value; SqlConnection conn; SqlCommand comm; conn = new SqlConnection(GlobalSettings.DbDSN); comm = new SqlCommand("INSERT INTO myTable (memberGUID) VALUES (@memberGUID);", conn); comm.Parameters.Add("@memberGUID", System.Data.SqlDbType.Text); comm.Parameters["@memberGUID"].Value = cookie; try { conn.Open(); comm.ExecuteNonQuery(); return "Item added: cookie = " + cookie + " / pageId = " + pageId + " / inOut = " + inOut + " / pageId = " + pageId + " / itemId = " + itemId + " period = " + period; } catch { return "Item caught: cookie = " + cookie + " / pageId = " + pageId + " / inOut = " + inOut + " / pageId = " + pageId + " / itemId = " + itemId + " period = " + period; } finally { conn.Close(); } } At the moment I'm just trying to insert the value of the cookie into the database as a test.  It works fine when I

Cannot INSERT record using Asp.Net Dynamic Data Domain Service Web Applications

 Hi, I am working on a 'Asp.Net Dynamic Data Domain Service Web Application' project using just 2 tables, FAQ_Categories and FAQs. The FAQs table has a foreign key to the FAQ_Categories. The steps are straight forward. Add a new project (Asp.Net Dynamic Data Domain Service Web Applications) Add folders Model ( for Linq2Sql datacontext), Domain (for the Domain Services class) Add Linq2Slql and add the 2 tables to the designer. Build the project. Add the Domain Service Class to the Domain folder. in the wizard select the DataContext, uncheck the Enable Client & Expose ODate checkbox Check bothe table & their corresponding Enable Editing tables checbox Check the Generate Metadata class Click OK. In Global.asax set Scaffold to true and add the DomainService name. Build and run.   Pages List and Detail are working fine. But if I try to insert a new record, I get the error "FaqId is required" Faq_ID is the primary key in the database table and it is set to Identiy. The Datacontext is correct, it marked the FAQ table with <Global.System.Data.Linq.Mapping.ColumnAttribute(Storage:="_CustomerId", AutoSync:=AutoSync.OnInsert, DbType:="Int NOT NULL IDENTITY", IsPrimaryKey:=true, IsDbGenerated:=true)> _   I tried this using Linq2Sql, Entity Framework, And both in VB and C# with the same result. I am using VS20

Unable to prepare the SSIS bulk insert for data insertion

Hi,   I am using SQL Server Destinations in my data flow tasks. I'm running this package in the server until i encountered this error:   OnError,,,LOAD AND UPDATE Dimension Tables,,,10/24/2007 1:22:23 PM,10/24/2007 1:22:23 PM,-1071636367,0x,Unable to prepare the SSIS bulk insert for data insertion. OnError,,,Load Dimensions,,,10/24/2007 1:22:23 PM,10/24/2007 1:22:23 PM,-1071636367,0x,Unable to prepare the SSIS bulk insert for data insertion. OnError,,,Discount Reason, ISIS Condition, ISIS Defect, ISIS Repair, ISIS Section, ISIS Symptom, Job Status, Parts, Purchase SubOrder Type, Service Contract, Service Reason, Service Type, TechServiceGrp, WarrantyType, Branch, Wastage Reason,,,10/24/2007 1:22:23 PM,10/24/2007 1:22:23 PM,-1073450974,0x,SSIS Error Code DTS_E_PROCESSINPUTFAILED.  The ProcessInput method on component "Dim_T_ISISDefect" (56280) failed with error code 0xC0202071. 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. What could be the reason for this? I don't usually have an error.   cherriesh

SQL ServerDestination error - Unable to prepare the SSIS bulk insert for data insertion.

Having searched the forum, this one clearly has form... However beyond assisting those who have fallen at the first hurdle (i.e. forgetting/not knowing that they cannot execute the package remotely to the instance of SQL Server into which they are inserting), the issues raised by others have not been addressed. Thus I am bringing nothing new to the table here - just providing an executive summary of problems which others have run into, written about, but not received answers for.   First the complete error: Description: Unable to prepare the SSIS bulk insert for data insertion.  End Error  Error: 2008-01-15 04:55:27.58     Code: 0xC004701A     Source: <xxx> DTS.Pipeline     Description: component "<xxx> failed the pre-execute phase and returned error code 0xC0202071.  End Error  DTExec: The package execution returned DTSER_FAILURE (1).  Started:  4:53:34 AM  Finished: 5:00:00 AM  Elapsed:  385.384 seconds.  The package execution failed.  The step failed.   Important points It mostly works - It produces no error more than 9 times out of 10. It fails on random dataflows - My package has several dataflows, (mostly) executing concurrently. Where the error occurs it does not do so on the same dataflow each time: on one run it'll fail on dataflow A whilst B,C,D and E succeed, then A-E will all succeed (and continue doing so for the next ten runs thereafter), and
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