Register  |  Login




Advertisement

Start Your Own Q&A Site

Create your own Q&A site easily, allowing you to quickly grow a new community around any subject matter or generate new organic traffic for your existing website.

Question

Status: Open Points: 75 Time: 23:02 - Mar 06, 2009  

priyaravi2008

i want to insert bulk of records into table?thank you

I want to insert 10 records based on some condition

Categories

Answer Discussion
Tutorials

 

Anpanman

Date:: Mar 07, 2009

Time:: 00:07

Hi,
I'm not sure why you want to bulk insert, so if you explained the circumstances a bit more, it might be easier to help.
Nevertheless T-SQL (sql server) does have a BULK INSERT function to insert records from a text file.
You can see the specifications here: http://doc.ddart.net/mssql/sql70/ba-bz_9...
And see an example here: http://www.developerfusion.com/code/5357...

If that's not what you want I would create a for loop and insert the records one by one, depending on the condition you mentioned.

Hope this helps, otherwise, please give some more information.

priyaravi2008

Date:: Mar 10, 2009

Time:: 01:19

Thankyou for your response.for example in school project i want to send a fees details to all student's who are studying in I st standard.at the same time i want to store that details into database.Thankyou.

Anpanman

Date:: Mar 10, 2009

Time:: 02:30

So did any of the two ideas I proposed work for you?

You didn't mention where the fees details come from. Is it a file, do you type it in manually on a webpage?

priyaravi2008

Date:: Mar 13, 2009

Time:: 08:18

Thankyou Anpanmnan.its manually type on a webpage.in webpage user enter standard and fees details when user click the enter button,details are insert into student fees table who are studying in the particular standard.Thankyou.

Anpanman

Date:: Mar 17, 2009

Time:: 01:58

priyaravi2008, what is it that you have difficulties in doing? If you describe what you don't understand or what is causing you problems, maybe it would be easier to help you.
I'm not going to program the whole thing for you, but I'll be happy to give advice.

priyaravi2008

Date:: Mar 20, 2009

Time:: 07:39

Anpanam Thankyou for your response.thankyou.

dlcasale

Date:: May 13, 2009

Time:: 18:14

System.Data.SqlClient.SqlBulkCopy if you are pushing data into sql server. It will take a datatable, data rows or a data reader. You will also have other options such as fire triggers.

admin

Date:: Jun 04, 2009

Time:: 21:33

The question looks to be abandoned by the user who asked it. If no action is taken within 2 days, a Quomon Moderator will consider closing the question and distributing the points.

The Quomon Team

DevilAct

Date:: Apr 07, 2010

Time:: 03:48

hi this is devl act
there is a option in side tool bar name "bulk Copy or Bulk"
with the help of this option you can copy bulk files.

shahjayesh791

Date:: Mar 21, 2012

Time:: 04:19

if u want to insert the same data in sql without any tension then
1. create a .class file
this file contain 1 function for insert i.e. execute(str). if u want the internal code then i will send u after u like this logic. then after create a object of this file in ur code. then using this object u can call this function.now take the function call in loop.
i.e obj.execute("insert query").

using this function u can perform all type of insert, update and delete operation on database.

1 function = 3 operation.

Answer this Question

New User

Email:

Upon submission of this form, you will automatically be registered as a Quomon user and we will send your login information to this address

Registered User

Username:

Password:

Forgot Your Password?

Tutorials cannot be submitted until the Answer Discussion is complete.

Submit answers in the Answer Discussion area

Ask a Question

Have a new question? Ask!

You have 100 characters to use



Top Experts

View More

Rank

Expert

Points

1.

nidhi

10354

2.

oracleofDelphi

6493

3.

rcastagna

5596

4.

LAGM

4848

5.

PeterNZ

3487

6.

gonzalo

2840

7.

Mason

2770

8.

jgivoni

2303

9.

xarcus

1820

10.

Anpanman

917

Become an Expert

Register today to share your knowledge with the community and be recognized and rewarded for your contributions.


Register Here




"Psst, Quomon is a great site. Pass it on."     Tell a Friend  |   Link To Us  |   Save to Delicious  |   Digg! Digg it



Language Options

English:

www.quomon.com

Español:

www.quomon.es