.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 to submit data to a SQL Server database table from a custom page ?

Posted By:      Posted Date: September 14, 2010    Points: 0   Category :SharePoint
Using SPD, I have created a custom page. It has a form with ASP.NET controls textbox, radio buttons, dropdown, submit button etc., Also, I created a Database connection (to the SQLServer database table) under Database Connections. But not sure how to connect this form to the database connection so that when form data is submitted, the data will be inserted into the table.

View Complete Post

More Related Resource Links

create an infopath form that receive and submit data to sql server database in the same form



i want to create an infopath form that can receive the data out of the slq server database and edit the data in the database and then submit it.

here is what i did so far.

i created a data connection to a sql server database to SUBMIT the data.

also i created a data connection to the same sql server database to RECEIVE the data.

when i open the form the user and the user's details are already filled in the form, now i need to let the user edit the data in the fields or add a new data in a field and then the form need to be submitted to a temporary database to be checked first by an approver and after approval the form must be submitted to the real sql server database.

i tought about that the approver just need to click a button and the data will be submitted to the the real database.

both the temporary and the real database has the same tables and fields.

i just need to know how to edit and submit the data to the temporary later to the real database



Data Points: Windows Azure Table Storage - Not Your Father's Database


Let go of your traditional relational database thinking if you want to understand how Windows Azure Table storage works, says Julie Lerman. Luckily for you, she's done the hard work to grasp the new concepts and help you get up to speed.

Julie Lerman

MSDN Magazine July 2010

Under the Table: How Data Access Code Affects Database Performance


In this article, the author delves into some commonly used ways of writing data access code and looks at the effect they can have on performance.

Bob Beauchemin

MSDN Magazine August 2009

Under The Table: Spatial Data Support In SQL Server 2008


New spatial data support in SQL Server 2008 opens the door to mapping and querying geometric and geographic data, allowing you to build exciting new applications.

Bob Beauchemin

MSDN Magazine February 2009

SQL Server 2005: Jazz Up Your Data Using Custom Report Items In SQL Server Reporting Services


Custom report items in SQL Server 2005 Reporting Services address your needs for custom reports without the pain of doing it from scratch.

Teo Lachev

MSDN Magazine October 2006

SQL Server: Display Your Data Your Way with Custom Renderers for Reporting Services


SQL Server 2005 Reporting Servicesis a great tool that offers a centralized approach to storing and rendering reports. It also lets users view and download reports without installing additional software. Plus, reports can be saved in any number of different formats using custom report renderers. In this article, the author will develop one such report renderer that outputs HTML reports, but the skills you'll learn can easily be used to create a renderer for Microsoft Word documents or any other format of your choosing.

James Yip

MSDN Magazine February 2005

Data Deployment: Streamline Your Database Setup Process with a Custom Installer


Database setup can be a tough and time-consuming process and sometimes fall victim to human error. Microsoft Installer or InstallShield can help, as can your own custom installer. In this article, the author tackles one approach to writing database installers and demonstrates the process with a working code sample.

Alek Davis

MSDN Magazine September 2004

Metadata: Create a Database Schema Repository with Meta Data Services in SQL Server 2000


SQL Server 2000 Meta Data Services is a repository technology that stores and manages metadata for SQL Server. Instead of building database schemas over and over, Meta Data Services allows you to freeze an entire schema for use in other projects. You can also use these schemas for training, testing, or debugging. In this article, the authors will review the various components of Meta Data Services and show how it can be programmed using a Visual Basic client, XML, and XSLT. They will also show you how to manage and manipulate your metadata by generating a simple database schema using a SQL Server repository.

Alok Mehta and Ricardo Rodriguez

MSDN Magazine May 2003

need your help regarding table and database.. without data lose



I have a table like this in database

ItemNo ItemName Qty  

001       A               50       

002       A               20      

003       B               50  

004       C               60      

005       D               40 

006       E               90      

upto it has some 3000 rows in table..

Now what my problem is i have one more field in mydevelopment PC let us consider another column Category

I need to update this column to my client pc without losing 3000 data from table which already exist...

How to do...?

Entity Data Model and database view returning the same columns as there are in a table


When adding a stored procedure into the Entity Data Model I can select whether the procedure returns a scalar, a (new) complex type or one of the entity types I already defined. 

How do I do something similar for a view?

I mean assuming I have a view like this

CREATE VIEW FilteredFoos as SELECT Foo.* FROM Foo join ... WHERE ...

(that is a view that implements some involved filtering, but returns all columns from one table) how do I add it to the project so that I can use the entity set, but get the Foo objects, not some new FilteredFoo objects.

var foos = myDB.FilteredFoos.Include("Bar").ToList();

foreach (Foo foo in foos) { ...

Thanks, Jenda

Importing SharePoint List Data into Project Server 2007 Custom Fields

Learn how to use the programmability features of Project Server 2007 and Windows SharePoint Services 3.0 to import SharePoint list data into an enterprise custom field.

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 

How to create a view in my database from a table in another server/database

Is there a way to create a view in my database referencing a table in another server/database if I have the connection information.  I know how to do it in Oracle, simply create a database link, but have never done so in sqlserver.

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

Facing MSDTC related issues while archiving data from one database server machine to another databas

I have a question with respect to distributed transactions when carried out between two database server machines on the same network.   Consider there are two database server machines \SOURCE_DATABASE_SERVER\ and \DESTINATION_DATABASE_SERVER\. Now we have to archive the data from one database server to other database server.   Let us suppose the database server \SOURCE_DATABASE_SERVER\ is the live production database server and \DESTINATION_DATABASE_SERVER\ is Long term storage database server. Now data from \SOURCE_DATABASE_SERVER\ needs to be archived into the database server \DESTINATION_DATABASE_SERVER\.   So I have written a dynamic stored procedure which includes distributed transaction (begin Tran, commit Tran, rollback            Tran) coding in it.   Now initially when I executed the procedure, it gave some of the following errors   1) OLE DB provider "SQLNCLI" for linked server "\DESTINATION_DATABASE_SERVER\" returned message "The partner transaction manager has disabled its support for remote/network transactions.". Msg 7391, Level 16, State 2, Line 1 The operation could not be performed because OLE DB provider "SQLNCLI" for linked server "\DESTINATION_DATABASE_SERVER\" was unable to begin a distributed transaction.    

How to copy table data from test to production database

I'm using SQL Server 2008 R2 and I'd like to copy all data rows from one table of a test database to the identical table in a production database. The primary key of the table is referred to by other tables so a DELETE followed by a number of INSERTs won't do it because of referential integrity issues. What is the best method to replace the data rows in the destination database with the values from the source database? Thanks, Guido

Issue inserting to database on submit the page goes blank

Hi guys,I'm new to asp.net, can someone please help me with this. I'm trying to insert few values to a table, when i press the submit button the aspx page goes blank and i don't get any error message. I'm not able to find where the error is.The code:Protected Sub AddMInfo_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles AddMInfo.Click Dim dbsource As SqlDataSource dbsource = New SqlDataSource         dbsource.ConnectionString = ConfigurationManager.ConnectionStrings("dbConnectionString1").ToString         dbsource.InsertCommandType = SqlDataSourceCommandType.Text         dbsource.InsertCommand = "INSERT INTO db_mdl_info(dlprodid,dlmdlid,dlbrnd,dlmdlnm,dlmdlnbr,dlcpst,dlprsr,dlmxm,dlmim,dlmslt,dlmxps,dlmtpe)" &                                 "Values('" & DropDownList2.Text & "','" & DropDownList3.Text & "','" & MakeTextBox.text & "','" & DropDownList2.SelectedItem.Text &                                 "','" & MNoTextBox.Text & "','&quo
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