Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
>>I'm getting an error that says ~Table number is invalid~.
>>I looked it up in MSDN and found the error, but all it says is to select a number between 1 and 256 . . . huh? The table name is inventory_in. is that too long? how many characters does foxpro expect for a max?
>>
>>Thanks
>>JD
>
>Sounds like to me you have a line of code that is like...
>
>SELECT 1000000
>
>What is the line of code where the error occurs?
Well, actually I thwarted the error, but now have a new problem ...
the method is in the valid event of a combo that takes it's contents from the table it's searching ~IOW, I know the record I'm searching for exists~ However, the method returns that the record doesn't exist. Here's the code ....
CLOSE DATABASES
OPEN DATABASE ('c:\diamondaccounti\inventory control')
if !used('inventory_in')
use inventory_in
else
select (inventory_in)
endif
SET ORDER TO stocknumbe
if !empty(Thisform.Combo4.value) AND type('Thisform.Combo4.value') == "N"
seek Thisform.Combo4.value
else
messagebox('This stocknumber does not exist in your database. Click "Ok" to return to Inventory Screen')
endif
IF FOUND( )
Thisform.CHARGEPERKARAT1.VALUE = chargeperkarat
Thisform.MEASUREMENTS1.VALUE = measurements
Thisform.Combo3.VALUE = cut
Thisform.Combo2.VALUE = colors
Thisform.Combo1.VALUE = clarity
Thisform.PRODUCTDESCRIPTION1.VALUE = productdescription
Thisform.Text1.VALUE = date_entered
Thisform.Text2.VALUE = date_removed
ELSE
GOTO RECNO(0)
CLEAR
? 'Closest matching listing is ' + stocknumber
? 'Record number: ' + ALLTRIM(STR(RECNO( )))
ENDIF
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement