Posted on 2009-05-17
Last Modified: 2012-05-07
Dear eXperts
I use ASP with an Access database and would like to make a BULK INSERT
from a text file.
Table: list_emails
2 Fields: id, email

Could y pls give me the code?

Question by:cosmopolita
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
LVL 29

Expert Comment

ID: 24407682
for only 125 points? :-)
do you have the code for inserting one email?
LVL 31

Expert Comment

by:Wayne Barron
ID: 24407819
Limited Members - 125 points is fine, no worries.

Explain a little more detail as to what you want to do.

LVL 31

Expert Comment

by:Wayne Barron
ID: 24407861
are you wanting to inserting a lot of emails into a database at one time, in one action?

What is this project going to be used for?
No offense, but this sounds like it could possibly be used for a Spam Email Program?
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now


Author Comment

ID: 24407995
Hola CarrzKiss
I would liekt o insert 20-50 emails.


Author Comment

ID: 24408032
Dear Carrzkiss
No, this is not for Spam.
I have a list of clients and want to keep this list clean.
Adresses are added, deleted, unwanted and not existing taken out etc.
The list will have not more than 500 addresses.
 Yeah, you are right - didn't think about this possibility
LVL 31

Accepted Solution

Wayne Barron earned 125 total points
ID: 24408101
code below

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
set conn= Server.CreateObject("ADODB.Connection")
conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
Server.MapPath ("yourdb.mdb") & ";"
Dim strArray, conn
strArray = Split(Request.Form("MyTextField"), vbCrLf)
Dim arrValue
For Each arrValue In strArray
   Dim sql
   sql = "INSERT INTO list_emails (email) VALUES ('" & arrValue & "')"
<form id="form1" name="form1" method="post" action="Insert.asp">
  <textarea name="MyTextField" cols="50" rows="10" id="MyTextField"></textarea>
  <input type="submit" name="button" id="button" value="Submit" />

Open in new window


Author Closing Comment

ID: 31582431
Wow, this worked fine and on the first run :-))
LVL 31

Expert Comment

by:Wayne Barron
ID: 24408198
That code is from my KB that I am making for codes.
Another EE helped me the code on here a while back.

Glad you liked it.
Good Luck

Author Comments:
Wow, this worked fine and on the first run :-))

Author Comment

ID: 24409828
Dear CarrzKiss
Please, just let me know what KB-Code are and what you make.

Greetings from Spain
LVL 31

Expert Comment

by:Wayne Barron
ID: 24410191
KB = Knowledge Base
I do just about anything with ASP/SQL/Access (SQL Server).
Learning a lot as I go as well.

I do a lot of projects here on EE, and what I do I add to my KB.
I also do Code-For-Hire, for certain projects that are to HUGE to do here on EE.
(There is only so much that you can do for free you know?)

I have been doing ASP for about 5 yrs now, but the last 2 years of really been my best work.

Any thing you want to know about, just ask or check out my profile.

Have a good one.
From the US.
Wayne (Carrzkiss)

Featured Post

[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: and…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor ( Top Charts is a view in which you can set seve…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

627 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question