AllExperts > Active Server Pages Programming (ASP) 
Search      
Active Server Pages Programming (ASP)
Volunteer
Answers to thousands of questions
 Home · More Active Server Pages Programming (ASP) Questions · Answer Library  · Encyclopedia ·
More Active Server Pages Programming (ASP) Answers
Question Library

Ask a question about Active Server Pages Programming (ASP)
Volunteer
Experts of the Month
Expert Login

Awards

About Us
Tell friends
Link to Us
Disclaimer

 
 
 
 
About Srini Nagarajan
Expertise
I can answer any kind of questions in ASP.NET, C#, VB.NET, SharePoint 2007, ASP, Coldfusion, Powerbuilder 7.00 / 8.00, JAVA servlets, MS SQL 2000 / MSSQL7, Sybase

Experience
Contact me if you need any custom development on ASP.NET, ASP, SharePoint 2007, Coldfusion, Powerbuilder.
 
   

You are here:  Experts > Computing/Technology > Business Software > Active Server Pages Programming (ASP) > Creating new entries into database

Active Server Pages Programming (ASP) - Creating new entries into database


Expert: Srini Nagarajan - 4/4/2008

Question
The following codes insert a new entry into access database with default name as 'NEW: Click To Edit'.  So, a user has to edit the entry later after it has been created.  It is causing some problems as user may not realize a new entry has been created, and often left it on database without entering any info.

Is there anyway you can show me how to change the way user enter new entry, such as entering their information before the entry is actaully being created?
Thank you!


'insert a new entry
if action = 1 then
  set Conn = server.createobject("adodb.connection")
  Conn.Open "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=" & dbPath
  mySQL = "INSERT INTO tblProj(ProjName,ProjDate,ProjPrivate,projlastuser,projrand) VALUES ('NEW: Click To Edit',#" & date() & "#,'off','" & stampedname & "','" & randgen() & "');"
  conn.execute(mySQL)
  closeconn()
  response.redirect("projects.asp")
end if

Answer
hi,

Sorry for the delay in reply.

Can you leave the name blank and while displaying you can replace the blank to "new clik to edit" text?

or

you can insert once user enter info until you can keep the info in session, this will be applicable if the user does everything on the same session.

or

keep another temp table and store the necessary info there, once the user enter the data take the info from temp and move to "project" table and delete from the "temp" table.

hope any of the solution will solve the problem

Happy programming!!!

-Srini

Add to this Answer   Ask a Question


 
User Agreement | Privacy Policy | Kids' Privacy Policy | Help
Copyright  © 2008 About, Inc. AllExperts, AllExperts.com, and About.com are registered trademarks of About, Inc. All rights reserved.