updating fields in MS Access

Please support our Perl advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Jan 2006
Posts: 237
Reputation: katharnakh is an unknown quantity at this point 
Solved Threads: 33
katharnakh's Avatar
katharnakh katharnakh is offline Offline
Posting Whiz in Training

updating fields in MS Access

 
0
  #1
Feb 27th, 2007
hi,

I am having problem in updating tables in MS Access. The field which I
want to update is of DATE type.

here is the code..

#! C:\Perl\bin\perl.exe
  1. use Win32::ODBC;
  2.  
  3. my $db = new Win32::ODBC('ServerStatistics');
  4.  
  5. $q="select distinct(build_date) from wdf_history";
  6. $db->Sql($q);
  7. while($db->FetchRow)
  8. {
  9. $s = $db->Data();
  10. print $s;
  11.  
  12. }
  13.  
  14. $q = "select * from wdf_history where build_date='$s'";
  15.  
  16. while($db->FetchRow)
  17. {
  18. $s = $db->Data();
  19. print $s;
  20.  
  21. }
  22.  
  23. $q="update wdf_history set build_date='2007-02-27' where
  24. build_date='$s'";
  25. $db->Sql($q);
  26.  
  27. $q = "select * from wdf_history where build_date='$s'";
  28.  
  29. while($db->FetchRow)
  30. {
  31. $s = $db->Data();
  32. print $s;
  33.  
  34. }

This does not get updated. Why? what I should do??

Thank you,
Regards,
kath.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for Perl
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC