473,320 Members | 1,930 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

How 2 store values through Stored Procedure from ARRAYLISTwhich is from Database only

KalariaNitya
hi All,

i am working on ASP.NET and Sql Server 2005.

i want to send arraylist from frontend to sql server and fatch it's value in database and then insert one by one row..

means in my arraylist more than one rows are present. and i want to send that arraylist in database and then fatch value from that arraylist and then store.

i want to use database connection only one time to send arraylist.

can any body help me, how to do that?

any help will be really appriciated..
Jul 18 '08 #1
1 1203
ck9663
2,878 Expert 2GB
Here's a pseudocode

Expand|Select|Wrap|Line Numbers
  1. Connect to your db.
  2.  
  3. For each cell of your array
  4.   exec('insert into tablename (field1, field2, field3) values (' + cell[1] + ', ' + cell[2] + ',' + cell[3] + ')'
  5.  
  6. Close your connection.
Again, this is a pseudocode.

Don't forget to handle errors.

-- CK
Jul 18 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Christopher Brandsdal | last post by:
Hi! I have a delicatg problem.... I have made a registration form for adding my friends information in a database. The problem is that I want to connect the persons with companies in the same...
2
by: serge | last post by:
My project is to automate testing of Stored Procedures of type SELECT (at least for now). I want to create a table where each stored procedure's input parameter values are entered and in another...
8
by: Thomasb | last post by:
With a background in MS SQL Server programming I'm used to temporary tables. Have just started to work with DB2 ver 7 on z/OS and stumbled into the concept of GLOBAL TEMPORARY TABLE. I have...
1
by: esmith2112 | last post by:
We all of a sudden find ourselves in dire straits, because we have one of those mysteries where everything used to work, and apparently, all of a sudden everything went to pot just in time for a...
7
by: Peter D.C. | last post by:
Hi I want to update data hold in several textbox controls on an asp.net form. But it seems like it is the old textbox values that is "re-updates" through a stored procedure who updates a SQL...
5
by: Alan T | last post by:
Currently our SQL Server 2000 database table field is using char to store as boolean, ie. "T" or "F". Now we change the field from char to bit field. I am not sure how it has impact on the C#...
11
by: c676228 | last post by:
Hi everyone, I am just wodering in asp program, if there is anybody writing store procedure for inserting data into database since there are so many parameters need to be passed into store...
4
by: scparker | last post by:
Hello, We have a stored procedure that does a basic insert of values. I am then able to retrieve the ID number created for this new record. We are currently using ASP.NET 2.0 and use N-Tier...
1
by: sheenaa | last post by:
Hello friends, I m using ASP.NET with C# 2005 and SQL SERVER 2005 for the ASP.Net Website. I m using sqldatasource to connect and retrieve the data from database and then it displays the data...
5
KalariaNitya
by: KalariaNitya | last post by:
hi All, i am working on ASP.NET and Sql Server 2005. i want to send arraylist from frontend to sql server and fatch it's value in database and then insert one by one row.. means in my...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.