Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ListBox and Remote Views
Message
From
19/10/2000 13:55:07
 
 
To
19/10/2000 12:05:06
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00431539
Message ID:
00431637
Views:
11
Hi,
see coments below.

>I have a ListBox in a form that is populated with data from a remote view.
>When adding a record to the view I get an error when setting the .Enabled property of the ListBox to .F..

How listbox populated? I meand, RowSource and RowSourceType?

>At this point an APPEND BLANK on the view has already occurred.
>The error message is:
>Error: 1547
>Cannot insert an empty row from a remote view into its base table(s)

Hmm, interesting. What buffering mode you view have? If 3-rd - I know reason. View tries to update record automatically when record moved. Why record moved? Grid or list box scan records of alias to show data - that cause record movement. Probably when you will set 5 buffering mode (table buffering mode) for view, it will work ok.

>
>I tried the following:
>
>CURSORSETPROP('SendUpdates', .F., myView)
>myListBox.Enabled = .F.
>CURSORSETPROP('SendUpdates',.T. , myView)
>
>This approach worked for the error part but the problem is that if I cancel out of the adding process then TableRevert() doesn't do its job and I ended up with a BLANK record.

Just because CURSORSETPROP('SendUpdates', .F., myView) cancels all changes in cursor. Than tablerevert will not recognize that something was changed and will not work. SetFldState() will not help here too because it does not work properly to mark record as 'added', it can mark it as 'changed' only.

>I checked GetFldState(-1) before and after I changed the .Enabled property off the list to .F. and it changed from '3333333' to '1111111'; probably the reason why the TableRevert() fails to work.

The reason is CURSORSETPROP('SendUpdates', .F., myView) command.

>I tried to change the state of the record using SetFldState() only to find that, as quoted on the Hacker's Guide, this function has a strange behavior.
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform