Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Scatter name causing data type mismatch
Message
From
02/07/2001 09:01:33
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00525812
Message ID:
00525834
Views:
19
Hi!

As David suggested, the problem is in the Text Boxes. Some field in the table can match to the text box property, however that standard property of TextBox allows only certain values.

I suggest you use another field names in tables, if it is possible, or just use another object. You can also use the default VFP object created by SCATTER NAME when you specify memory variable that do not exists.

HTH.

>I previously used the scatter memvar command, which worked, but all variables were public, so now I am experimenting with the Scatter Name oObject command.
>
>I have a sample test form with a page frame on it. On one page I have a grid and above that a few textboxes. In the data environment of the form I have a table called Product.
>
>I want to scatter the fields from this table into textboxes so that they can be viewed & edited (if necessary). I then want to gather the info from these textboxes.
>
>In the afterrowcolchange event of the grid I have placed a Scatter Name Product
> Command (to create an object of the same name as the table). The grid control source is set to Product (which is a table product.dbf)
>
>I have a few text boxes such as txtCode (Control source: m.code) and txproduct (m.product)
>Txtprice (m.price) and a few other fields.
>
>I keep getting a data type mismatch when I run the form and click in the grid (scatter name Product)
>
>I see in the local window of the debugger that some of these fields are shown there after clicking on the page (due to the blank textboxes). (I have also set the value of fields such as Price to zero, because they were showing up as character)
>Name: Value: Type:
>Code "" C
>Product "" C
>Price 0 N
>
>Then when I click on the grid (and Scatter Name Product) I get the Data Type Mismatch error. The textboxes on the form remain blank. I can then however see the object(Product) in the Local debugger window with a + sign. Expanding this shows me all of the tables fields, correctly filled with data from the record I tried to click on. However these object fields are not being scattered into the textboxes.
>
>Any help would be appreciated.
>
>Regards
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
Reply
Map
View

Click here to load this message in the networking platform