ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 27th, 2003, 09:20 AM
CCCMTech's Avatar
CCCMTech CCCMTech is offline
SBC Online Tech
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: Somewhere between here and there
Posts: 22 CCCMTech User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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...

Reply With Quote
  #2  
Old October 27th, 2003, 10:26 AM
Pain Pain is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: Sheffield, UK
Posts: 94 Pain User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Send a message via ICQ to Pain
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.

Reply With Quote
  #3  
Old October 30th, 2003, 02:56 PM
CCCMTech's Avatar
CCCMTech CCCMTech is offline
SBC Online Tech
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: Somewhere between here and there
Posts: 22 CCCMTech User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > Update without overwriting


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT