Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP basic txtbtns - Add-Update rows not working with CAs
Message
 
 
To
23/04/2007 16:24:51
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
01219051
Message ID:
01219099
Views:
9
I meant aUsed. How many aliases open do you have in your form? I'm with Borislav here, you may accidentally switch to the wrong alias and don't even know.

Just put in debugger:

fcount()
fcount('MyCAAlias') and see if the numbers differ.

>>>>>yes, it is the only cursor open at the time. It is a CursorAdapter thru ADO, if that makes a difference.
>>>>
>>>>Hard to say, then. Can you post some code?
>>>
>>>sure. This is the lines of code, but I can see the problem from the debugger as soon as I get the form up:
>>>
>>>
>>>	FOR m.nFld = 1 TO FCOUNT()  && <----- is where it returns 2 and I know the table only has 1 field
>>>        	IF TYPE(FIELD(m.nFld)) = "G"	&&skip for General fields
>>>			LOOP					
>>>		ENDIF
>>>		IF OLDVAL(FIELD(m.nFld)) # CURVAL(FIELD(m.nFld))
>>>			m.lHadMessage = .T.
>>>			IF MESSAGEBOX(E_DIRTYREC_LOC,4+48) = MSGBOX_YES
>>>
>>>
>>
>>Can you put select your alias right before this code or add fcount('MyAlias') here? What does aused return?
>
>there is a select correct alias a head of this code, just not right before it. and Used() returns my correct alias, while fcount() returns 2 and afields() returns 1 in the debug window, when stopped at the for line.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform