Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Storing a character data type into a numeric data type f
Message
From
06/04/1999 17:06:47
 
 
To
06/04/1999 16:15:19
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00205448
Message ID:
00205778
Views:
21
Hi John --

I haven't done a very good job explaining my situation. Sorry about that. I will try again and hopefully I can lay it out better.

I have a table called "county_assignments.dbf", which only has three fields:
nassingid =Numeric pk
njurisid = numeric fk
cjurisname = character

I created a form called county_assignments.scx, using the three fields above.

nassignid is simply a textbox
njurisname is a combobox

My issue is with the field njurisid. I have this set up as a combo box on my form. Let's say for example it holds state names (Florida, Alabama, etc.). When I select a state, it places the state name in the box, just like I want it to do. By the way, the control source for the combo box is a view I created that is holding the state names and the id for the state names.

The issue comes with how FoxPro stores this data in my table (county_assignment.dbf)

I would like to know how to store the state name "FLORIDA" into the table, versus having its "id" stored back into the table, which is currently the case. The problem is that the field it is being stored back into (njurisid) is numeric, and I want the "word" FLORIDA to be viewed in the table, not the id.

The combo box in question is set to
bound = 2
bound to = .T.

The reason why I am even asking about this is b/c in Access, which I am much more proficient in, when I create a table I can designate a "lookup" for a field which is an integer and store characters back into it.

As it stands right now with my app in FoxPro, I can't do that. I am trying to make this adjustment from the Form Designer, and store info. into a table I already created that isn't set up to receive a character datatype, when it is earmarked as numeric.


I guess my question is>

Does FoxPro have the ability to allow the developer to store character strings (such as a "FLORIDA", back into a table with a field that has its data type set to numeric.

If FoxPro can do that, is there a way I can set that up in the tables, before going to the form designer?

I apologize for the length of this, but I hope I have explained this a little better.

One last thing. Should this even be a concern. The id that is being stored is the actuall id representing the character string, however, it would be nice to view the word and not the number if it is possible to accomplish.

Thanks for the help

Jason
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform