Home

Communication Horizons
established 1986

Home
Contact

 

Knowledgebase Index
About Us
Contact
Legacy Products


Communication Horizons
65 High Ridge Rd. #428
Stamford CT 06905

support

800-480-1604
203-321-1278
fax  286-1056

       

Knowledgebase


>>ITEM: N01025

>>DATE: July 28, 1998

>>TYPE: Information

>>TITLE: Cannot store encrypted string in numeric field

>>PRODUCT(S):
NetLib SEC
NetLib 6.5 for Clipper
NetLib 2.5 for FPW/D

>>PLATFORM(S):
All

>>SUMMARY:
You cannot use NetLib's N_ENCODESTR to store an encrypted string in a numeric field of your database.

 

>>MORE INFORMATION:

The database expects that you will only store numbers in a numeric field. The database will not allow you to store an encrypted string in a numeric field, since it contains non-numeric characters that were placed there during the encryption process.

One alternative is to use N_ENCODE to encrypt the entire file, in which case all fields, including numerics, will be encrypted.

The other alternative is to store the field in the database as a character field. You would use the VAL and STR functions to convert it back and forth. For example:
* IndID is now a character field * initial encryption replace all IndID with N_ENCODESTR(IndID) * extract field m.nIndID = VAL(N_DECODESTR(IndID)) * replace field (?? stands for decimals, if any) REPLACE IndID WITH N_ENCODESTR(STR(m.nIndID,LEN(IndID),??))

>>RESOLUTION/FIX:
Encrypt the entire file, or change your database so that the data is stored as a character field.

>>EXAMPLE(S):

>>SEE ALSO:

>>COPYRIGHT 1998 Communication Horizons
All rights reserved worldwide. No distribution without specific consent of publisher.


Knowledgebase Top Home

 

© Copyright 2001 Communication Horizons LLC.
“NetLib” and “Encryptionizer” are Registered Trademarks of Communication Horizons.
US and international patents pending.
Updated 29 Dec 2001