MS SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesMS SQL Development

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:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old October 15th, 2003, 10:53 AM
clanptbs.net clanptbs.net is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Posts: 5 clanptbs.net User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 17 m 31 sec
Reputation Power: 0
MS Access gives "BOF or EOF is true when SELECTING last entry

Hello
when I try to run a "SELECT * FROM Contracet WHERE phone='phone'" or any call that would pick the las row in the DB givs me the error

Warning: find1(): PropGet() failed: Exception occurred. Source: ADODB.Field Description: Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record. in H:\Documents and Settings\Don\Desktop\projects\form.php on line 179

and the line number iseny where i call

rs_NAME->value
name changing for each veriable

any i deas on how to prevent this

Thanks
Don

here is the code
PHP Code:
<?
function find1 ($form) {
    
$db_connection = new COM("ADODB.Connection");
    
$db_connstr "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" realpath("./ssatellite.mdb") . " ;DefaultDir=" realpath("./");
    
$db_connection->open($db_connstr);
    
$sql "";
    foreach (
$form as $k => $v) {
        if (
$v != ""){
            if (
$k == "Customer_Name" || $k == "Phone") {
                
$sql .= "$k='$v'";
            }
        }
    }
    
$rs $db_connection->execute("SELECT * FROM Contracts WHERE $sql");
    
$rs_ID    $rs->Fields(ID);
    
$rs_Date_1    $rs->Fields(Date_1);
    
$rs_Date_2    $rs->Fields(Date_2);
    
$rs_Date_3    $rs->Fields(Date_3);
    
$rs_Agent    $rs->Fields(Agent);
    
$rs_Source    $rs->Fields(Source);
    
$rs_in_Date_1    $rs->Fields(in_Date_1);
    
$rs_in_Date_2    $rs->Fields(in_Date_2);
    
$rs_in_Date_3    $rs->Fields(in_Date_3);
    
$rs_Day    $rs->Fields(Day);
    
$rs_DAY_AM_PM    $rs->Fields(DAY_AM_PM);
    
$rs_Customer_Name    $rs->Fields(Customer_Name);
    
$rs_Address    $rs->Fields(Address);
    
$rs_City    $rs->Fields(City);
    
$rs_State    $rs->Fields(State);
    
$rs_Zip    $rs->Fields(Zip);
    
$rs_Bill_to    $rs->Fields(Bill_to);
    
$rs_Phone    $rs->Fields(Phone);
    
$rs_Cell    $rs->Fields(Cell);
    
$rs_Work    $rs->Fields(Work);
    
$rs_Billing    $rs->Fields(Billing);
    
$rs_CC_Number    $rs->Fields(CC_Number);
    
$rs_SS_Number    $rs->Fields(SS_Number);
    
$rs_Receiver_Serial_1    $rs->Fields(Receiver_Serial_1);
    
$rs_Smart_Card_1    $rs->Fields(Smart_Card_1);
    
$rs_Receiver_Serial_2    $rs->Fields(Receiver_Serial_2);
    
$rs_Smart_Card_2    $rs->Fields(Smart_Card_2);
    
$rs_Num_Receiver    $rs->Fields(Num_Receiver);
    
$rs_Promotion    $rs->Fields(Promotion);
    
$rs_Equipment    $rs->Fields(Equipment);
    
$rs_Equipment_1    $rs->Fields(Equipment_1);
    
$rs_Equipment_2    $rs->Fields(Equipment_2);
    
$rs_Accessories    $rs->Fields(Accessories);
    
$rs_Accessories_1    $rs->Fields(Accessories_1);
    
$rs_Accessories_2    $rs->Fields(Accessories_2);
    
$rs_Installation_Notes    $rs->Fields(Installation_Notes);
    
$rs_Installation_Notes_1    $rs->Fields(Installation_Notes_1);
    
$rs_Installation_Notes_2    $rs->Fields(Installation_Notes_2);
    
$rs_tax    $rs->Fields(tax);
    
$rs_total    $rs->Fields(total);

?>
<html>
<body>
<form name="Main" method="post" action="<?= $_SERVER['PHP_SELF']; ?>">
  <table width="750" border="0" align="center">
    <tr> 
      <td colspan="6" align="center"> <h1>System Satellite</h1></td>
    </tr>
    <tr>
      <td colspan="6" align="center"> <h2>1-888-634-8327</h2></td>
    </tr>
    <tr>
      <td width="284">Date:
        <input value="<?= $rs_Date_1->Value?>" name="Date_1" type="text" size="1">
        / <input value="<?= $rs_Date_1->Value?>" name="Date_2" type="text" size="1">
        / <input value="<?= $rs_Date_1->Value?>" name="Date_3" type="text" size="1"></td>
      <td colspan="2">Agent: <input value="<?= $rs_Agent->Value?>" type="text" name="Agent"></td>
....................

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesMS SQL Development > MS Access gives "BOF or EOF is true when SELECTING last entry


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