944,161 Members | Top Members by Rank

Ad:
  • Perl Discussion Thread
  • Unsolved
  • Views: 2573
  • Perl RSS
Feb 27th, 2007
0

updating fields in MS Access

Expand Post »
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
Perl Syntax (Toggle Plain Text)
  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.
Similar Threads
Reputation Points: 19
Solved Threads: 34
Posting Whiz in Training
katharnakh is offline Offline
237 posts
since Jan 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Perl Forum Timeline: How to skip a line !
Next Thread in Perl Forum Timeline: How to capture STDOUT and the exit code





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC