|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Update without overwriting
I am working on a case assignment page...we have notes for each case and I want to be able to add notes to a case without overwriting them...
I am using Brinkster as my host, I am using a MDB file to store info. I'm trying to use the sql_update statement using the where variable too.. If there another variable I can add to keep it from overwriting the info that's already there? Ex. Problem Description: "Customer unable to browse" Update: "Checked browser settings, reconfigured DUN settings, able to browse" Problem description: "Customer Unable to browse Updated (timestamp) Checked browser settings, reconfigured DUN settings, able to browse" Currently I am able to get it to timestamp but not in the problem description....I currently have a "last updated" also if someone forgets to add the previous notes, it overwrites all the notes for that case... Help? Thanks in advance for all that help... (info that may help.. cccmtech.mdb cccmtech is the table name probdescr is the column name in the mdb, it's a memo type) Also this is my current update statment and declaration statement user_input = Request.Form("user_input") id_number = Request.Form("id_number") If Len(id_number) Then data_source = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & _ Server.MapPath("db/cccmtech.mdb") sql_update = "UPDATE cccmtech SET cccmtech.[timestamp] = now (), probdescr = '" & user_input & "' WHERE id = " & id_number Thanks again... |
|
#2
|
|||
|
|||
|
to update something means to alter a current record.
Hence using that logic you could never ever update something without over writing the old info. The only way you could do it is to create a table, or use the existing one, and do INSERT statements such that you create new instances of records... sorry bud. |
|
#3
|
||||
|
||||
|
Just so you know, it can be done..
Dim user_input, id_number, con, data_source, sql_update, rs, probdescr, sql_Select user_input = Request.Form("user_input") id_number = Request.Form("id_number") If Len(id_number) Then data_source = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & _ Server.MapPath("db/cccmtech.mdb") sql_Select = "SELECT probdescr FROM cccmtech WHERE id = " & id_Number RS.Open sql_Select, data_source user_input = user_input & vbCrlf & vbCrLf & RS("probdesc") RS.Close 'Note:Now you can update the field and you won't be overwriting any data already in the field. sql_update = "UPDATE cccmtech SET cccmtech.[timeupdate] = now (), probdescr = '" & user_input & "' WHERE id = " & id_number |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > Update without overwriting |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|