Wrox Programmer Forums
|
ASP.NET 1.1 As of 10/6/2005, this forum is locked as part of the reorganization described here: http://p2p.wrox.com/topic.asp?TOPIC_ID=35394. No posts have been deleted. Open ongoing discussions from the last week have been moved to either ASP.NET 1.0 and 1.1 Beginners http://p2p.wrox.com/asp-net-1-0-1-1-basics-60/ or ASP.NET 1.0 and 1.1 Professional. http://p2p.wrox.com/forum.asp?FORUM_ID=50. See my sticky post inside for more.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.1 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 29th, 2005, 07:24 AM
Authorized User
 
Join Date: Aug 2005
Posts: 68
Thanks: 0
Thanked 0 Times in 0 Posts
Default Insert data to Database

I have a session variable that I print data from like
The session variable is declared on my page as objDT
<%
Dim objDT As System.Data.DataTable
Dim objDR As System.Data.DataRow
for each objDR in ObjDT.rows
Response.Write(objDR("Produktnamn") & objDR("PID") & objDR("PAKID") & objDR("quantity") & objDR("styckpris"))

next
%>
This works it print all the rows from the session
How would I change the code so I would get the variables into parameters and then use a storedProcedure to insert into database.
I know that parameters would be like
@Produktnamn
@PID
@PAKID
@Quantity
@styckpris
I manage to do the storedprocedure but what should I write in .aspx file

 
Old September 29th, 2005, 02:43 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

see the sqldataadaper to sqlcommand objects






Similar Threads
Thread Thread Starter Forum Replies Last Post
How to insert a value into database? [email protected] VB.NET 13 September 21st, 2006 10:38 AM
INSERT Data to SQL Database Lofa ASP.NET 1.0 and 1.1 Basics 1 February 22nd, 2006 03:09 AM
Can't insert into database chrscote Classic ASP Databases 1 June 15th, 2005 04:07 AM





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