Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
|
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 18th, 2006, 12:13 AM
Authorized User
 
Join Date: Mar 2006
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default insert multiple record in sql server

hi,

i have problem with inserting multiple row record in sql server. i have a form where there is more than 1 checkbox, when the end user check on checkbox, i want insert this value to sql server. can anyone tell me how it work? thanks.

 
Old September 18th, 2006, 06:47 AM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Do you mean you are trying to gather the value of a checkbox and insert it into a database?

--Stole this from a moderator

I will only tell you how to do it, not do it for you.

Unless, of course, you want to hire me to do work for you.
 
Old September 18th, 2006, 07:05 PM
Authorized User
 
Join Date: Mar 2006
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

dparson,
yup, tat's what i want. i want to gather all the information tat checked then insert it into database, it will be a multiple record.

 
Old September 19th, 2006, 08:48 AM
Registered User
 
Join Date: Sep 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Transact SQL Cursors

http://msdn2.microsoft.com/en-us/library/ms190028.aspx


 
Old September 19th, 2006, 08:56 AM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

I try to steer clear of cursors whenever possible as they seriously degrade your preformance. In so far as 'Multiple Record' I assume you mean you are inserting 2 rows of data.

In .NET you can use a text command or a paramertized query to do this, and then call it as many times as needed; if i was doing this inside of sql (depending on the situation) i would do something like

INSERT INTO [table]([value1], [value2])
    SELECT [value1], [value2] From [AnotherTable] Where [value3] = [something]

--Stole this from a moderator

I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Insert multiple row in server. Somesh .NET Framework 2.0 1 June 1st, 2007 08:03 AM
Insert multiple records using one SQL Query. Deepak Chauhan SQL Language 3 April 12th, 2006 07:43 AM
Insert Multiple Record in SQL Server in Once lauhong28 SQL Server 2000 1 February 24th, 2006 02:43 PM
errro trying to insert record to sql server method ASP.NET 1.0 and 1.1 Basics 1 May 20th, 2005 08:24 PM
Adding a new record to a sql server DB morpheus VB How-To 6 August 6th, 2003 06:15 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.