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

Advertisement


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

Active Server Pages Programming (ASP)

All Answers


Answers by Expert:


Ask Experts

Volunteer


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.

©2012 About.com, a part of The New York Times Company. All rights reserved.