Inserting Data To SQL Database And Sending Email At The Same Time?
I’m attempting to insert some basic information (name, address, details) to the sql database and send a notification email (at the same time).
Right now, I can insert the information to the DB after I click submit, but how can I also receive an email? Please give some ideas how to do it.
View Replies
ADVERTISEMENT
i have an access db with a "date/time" data type with a format of "Long format";
i want to add the date/time automatically in DB when a user submit a form.
i tried using the
xdate = formatdatetime("var",1)
and putting that var in the DB, but i get an error
can someone show me how to do it right?
View Replies
View Related
Does anyone know how i could send bulk info from a database to an email? Like an order confirmation for more than one product? or where i could find some info?
View Replies
View Related
I have sent form data through email using .asp before but I have never done it when you are using a form that has createelements involved. I have a form w/ 3 inputs, two text inputs and one select combo box. if i click an add user button it will appear with another row of 2 text boxes and a combo box, and you can repeat up to as many as you need. I am trying to figure out how to mail all of those values to someone. Is there an easy way. Below I will attach the code that I use to name the fields when they are generated maybe it will help....
<SCRIPT language="javascript">
counter = 1
function addRow(id){
var tbody = document.getElementById(id).getElementsByTagName("TBODY")[0];
var row = document.createElement("TR");
row.setAttribute("id","tr"+counter);
var td2 = document.createElement("TD");
var input2 = document.createElement("INPUT");
input2.setAttribute("type","text");
input2.setAttribute("name","pName"+counter);
input2.setAttribute("id","name"+counter);
td2.appendChild(input2);
var td3 = document.createElement("TD");
var input3 = document.createElement("INPUT");
input3.setAttribute("type","text");
input3.setAttribute("name","userName"+counter);
input3.setAttribute("id","prc"+counter);
td3.appendChild(input3);
var td4 = document.createElement("TD");
var input4 = document.createElement("select");
input4.name = "Role"+counter;
input4.id = "Role"+counter;
option = document.createElement("OPTION");
option.value ="Admin";
option.text = "Admin";
input4.add(option);
option = document.createElement("OPTION");
option.value ="Read";
option.text = "Read";
input4.add(option);
option = document.createElement("OPTION");
option.value ="Read/Write";
option.text = "Read/Write";
input4.add(option);
td4.appendChild(input4);
row.appendChild(td2);
row.appendChild(td3);
row.appendChild(td4);
tbody.appendChild(row);
counter++;
}
</SCRIPT>
View Replies
View Related
I have an ASP variable called IRNvar:
If IRNvar(0,num) = "True" then
IRNvar(0,num) = 1
else
IRNvar(0,num) = 0
end if
In my sql database I have a True/False field called VariantFlag which is a bit data type. The IRNvar value is numeric. I am trying to insert the 1 or 0 into the database so that the field shows true or false accordingly but I get a 'Type Mismatch' error. Here's the insert statement:
SQL = "INSERT INTO Documents (CNID, DocumentPrefix, DocCategory, DocumentName, VariantFlag, PartNo, PartDesc, NewIssue, StatusID) VALUES ('" & CNID & "', '" & IRNprefix & "', '" & IRNcat & "', '" & IRNnumber & "', " & IRNvar & ", '" & PartNum & "', '" & IRNDesc(0,num) & "', 'A', '5')"
Is there a way to convert the number to the right data type? Am I doing something wrong? I'm quite new to all this so it's probably something silly.
View Replies
View Related
i am trying to use the 'Insert into' sql query to insert data in an asp file but having some errors...this is the eror i got from the browser..
Error Type:
Microsoft VBScript compilation (0x800A0401)
Expected end of statement
/AddConfirm.asp, line 46, column 36
sql="INSERT INTO tblMembers VALUES("8"," & DateJoined & "",""& Title& "",""& LastName& "",""&FirstName& "",""& DOB & "",""& AddressUnit&"""
this is the code i have in my asp file....
Code:
View Replies
View Related
I would like to know if there are any tutorials out there or websites that can explain more about this? can this be done in asp?
View Replies
View Related
I am trying to insert data from a form into a database and i am getting the following error:
Microsoft JET Database Engine error '80004005'
Operation must use an updateable query.
The code that i used can be seen below: Code:
View Replies
View Related
I am trying to save arabic data from asp and it's not being saved with right encoding. i tried with both code pages 1252 and 1256. each time i am getting different set of characters in db, but not as i am entering in asp page.
when i retrieve arabic data from database and display in web pages it's showing correct text.
i am using following code in asp side: ....
View Replies
View Related
Does anyone know how I can insert daynamic text box data into a SQL Server database? I have text boxes that are being generated dynamically and I want each of those values inserted into the database that hold the results. I'm not sure how to write my loop statement.
View Replies
View Related
I am uploading a file using ASP code. After the user uploads the file, I would like to be able to open the file and check if the data is in a given format (comma separated) and also has all the data elements needed (i.e. all fields are there).
Is there a parse routine in asp that would allow me to do this. The user can upload any type of file as long as I am able to parse it and determine if the data is of the aforemention type.
View Replies
View Related
I'm having a probelm with inserting data into a database using asp but I can't see what i'm doing wrong. I get the page cannot be displayed error ....
View Replies
View Related
I have a member registration form that when the user clicks the submit button the form info is sent to a file name validate.asp.
The file validate.asp checks all the information to see if it correct and now I would like to have the data that was submitted added to an access database named members into a table that I named reginfo (registration info) and I have tried numerous ways to do this and spent countless hours browsing through websites but cant seem to get it to work. Code:
View Replies
View Related
i've got a database in ms access. using ASP (vbscript) and IIS. I can send text e-mails through ASP but i want to attach a file from the database to the e-mail when it is sent. can anyone give me any hints on how to get the data from access, attach it to the e-mail and send it on?
View Replies
View Related
I have an application form and as the user finishes the application form, an email is sent to the user to notify him/her that he/she has successfully been registered...what i want to do is that another email is sent to me at the same time to notify me that a new user has registered...is there a way to do it by only defining one CDO or do i need to create two CDO(s)...i mean:
Set objMail = CreateObject("CDO.Message")
Set objMail2 = CreateObject("CDO.Message")
.
.
etc...
can someone please advice me if this is the right way?
View Replies
View Related
there i was just windering how do i compare a date/time vlaue in sql server agaisnt the computers' date/time.
for example, if computer date/time is two months or 2 weeks before the database date/time do something
View Replies
View Related
Any some tools or sample codes drop down asp script execute time and
database connection time ?
View Replies
View Related
I'm wondering if it's possible to create an instance of an ADO Recordset and add values to it by ASP ??
Ex :
I have 2 arrays :
arr1 = Array(1,"allo")
arr2 = Array(2,"bonjour")
Is it possible to add these 2 arrays into a Recordset to manipulate de data more easily?
If yes, could you provide me with a little example to see the synthax, because I tried almost everything and it didn't worked at all
View Replies
View Related
I am trying to make a web-based front-end for one of our programs. I'm running into a problem. Here's a sample of one of our tables:
Code:
CaseNo ChargeCount ArrestCharge FiledCharge
123 1 13 13
123 2 14 14
199 1 03 03
The ChageCount column cannot have nulls and must be unique. is there a way when I'm adding a new charge, i can check to see if a chargecount exists? For example, if inserting a new record, it will first check if there is a chargecount, if there is not, it will make it 1. if there is a charge count, it will +1 to the existing chargecount
View Replies
View Related
I have a few queries regarding on email. Currently my web hosting provider uses Windows 2003 Server IIS 6.0 to host my ASP websites. In my own PC, I am also currently using Win XP Profession IIS 6.0 to run my ASP files.
I would like to create a pogram that would automatically sent out an email. But the problem is I have know that CDONTS do not work for Windows 2003 Server or XP Professional. It only currently work for Win 2000 Server.
Please help and perhaps show me the code of sending an email out automatically. Is there a code that can work for all servers?
View Replies
View Related
I have a form which will be processed by being sent to an ASP page. I would
like the ASP page to take the data from the Request.QueryString (which I
know how to do) and format it so I can have it emailed to me in a nicer
format. My problem is that I do not know how to have ASP send an email. I
know how to send an email using the mailto: protocol by making it look
something like the following:
MAILTO:username@mydomain.com?SUBJECT=mysubject?MES SAGE=mymessage
However, this will usually take the user to their default email client and
ask them to send an email by putting the specified subject and message in
for them, but wait for them to do any desired editing and click their send
button. I simply want the email to be sent straight from ASP. Is this
possible?
View Replies
View Related
Can anyone provide me with an example how I can send an email through ASP.NET!
View Replies
View Related
I have made a .asp file in order to send email to my Join Bytes!:
<%
Set mail = Server.CreateObject ("CDONTS.NewMail")
mail.To = "email@email.com"
mail.From = "mail@mail.com"
mail.Subject = "email subject"
mail.Body = "email body"
mail.Send
%>
The smtp function have been installed with the IIS, there is no error and the .asp seems running properly but I can't receive any email, any wrong?
View Replies
View Related
i have to do a project regarding employee transfer in which sending email to concerned employees yet to be transferred play a pivot role.
View Replies
View Related
I've been using CDO to send email from my web server for a while now but
today the emails aren't being sent. They are in the queue folder on my
server. I've restarted SMTP service but that didn't work. How can I get
these sent?
View Replies
View Related
how can send email using ASP?
View Replies
View Related
Im have made up a form that sends the information via email to an email address. Whenever I test the form though, the email does not display in HTML format. The email displays the html code but I want it to display as an html page.
View Replies
View Related
Set ObjMail = CreateObject("CDONTS.NewMail")
ObjMail.From = emlFrom
ObjMail.To = emlAddress
ObjMail.Subject = emlSubject
ObjMail.Body = emlBody
ObjMail.Send
Set ObjMail = Nothing
I recently upgraded my webserver from NT4.0 to Windows 2003 Web Edition. Now, the above code no longer works. It worked great on NT4
What do I need to do to make it work with my new server?
View Replies
View Related
I am trying to send an email to someone as the person clicks on a link...i have been trying the CDO, CDONTS, JMail and other methods but none of them work!!an example is as follows:
Set myMail=CreateObject("CDO.Message")
myMail.Subject="Sending email with CDO"
myMail.From="mymail@mydomain.com"
myMail.To="someone@somedomain.com"
myMail.TextBody="This is a message."
myMail.Send
I Im getting this error:
CDO.Message.1 error '80040220'
The "SendUsing" configuration value is invalid.
View Replies
View Related
I need a way to send an email using a normal HTML form and then taking those values and sending them to myself.
View Replies
View Related
Could someone advise me on the best way to send email either using asp or html? I'm not sure which way would be best. Basically I have a page confirming that data has been entered into a database and displaying what has been entered. I then want to have a link to email the information to someone. The email address has already been entered into the database.
View Replies
View Related
I asked how to send an email using CDO instead of CDONTS and got several responses. They were all good, I tested the code and it works well. However, I forgot to mention that I need to set the email body to be in HTML rather than in plain text format. Would appreciate if someone could post a complete example on how to do this.
View Replies
View Related
I have tried to use this peace of code to send test email
If Request.form("submit")="Submit" Then
Set objMail = CreateObject("CDONTS.NewMail")
objMail.To = "alex@alex"
objMail.From = "alex@alex"
objMail.Subject = "Feedback"
objMail.BodyFormat = "0" ' -- HTML format
objMail.Body = "Name: "
objMail.Send
Set objMail = Nothing
end if
It works fine but when I go to the drop folder it is filling it with hundreds of emails. When I look inside pickup folder there is only one email message. Does anyone knows why the drop folder is constantly filling with new email messages?It looks like it repeats it all the time like some kind of loop.I am using it locally for testing only
View Replies
View Related