Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Visual Dbase > problem with ST...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 2 Topic 90 of 130
Post > Topic >>

problem with STR() just occurred - pls help!!

by ortho@[EMAIL PROTECTED] (Cameron) Apr 1, 2005 at 06:00 AM

Hi

In 1999 I wrote a program which has 2 tables. The first keeps track of
clients and the second table, linked to the first keeps track of the
visits that each client makes. In the table structure the character
width of the c_code (unique client number) is 10, in the visit table
the order_no character width  is set to 8. Stupidly when I wrote the
program I only used a STR() <length expN> of 4. The code is below for
your perusal. Now what happens is that as we're at 9999 visits when
the prog ads 1 it gets 10000 and the STR() displays **** as the length
expN is smaller.

 Procedure newvisitbutton_OnClick
   set century on
   form.tabbox1.enabled=.f.
   this.enabled=.f.
   select client
   if eof()
   return
   endif
   select select()
   visitdbf=gprogdir+"visit.dbf"
   use &visitdbf again alias temp
   set order to order_no
   goto bottom
   orderno=val(temp->order_no)+1
   use
   strorderno=str(orderno,4,0)
   select visit
   form.beginappend()
   replace visit->order_no with strorderno
   form.spinbox1.value = date()
   form.orthotistentry.setfocus()

I've tried to change this by altering the 4 to 6 or 8 etc. but the
visit number just doesn't add. What can I do?

Please help.

Cameron
 




 2 Posts in Topic:
problem with STR() just occurred - pls help!!
ortho@[EMAIL PROTECTED]   2005-04-01 06:00:09 
Re: problem with STR() just occurred - pls help!!
Lrice <Lrice.28i9tz@[E  2006-05-28 02:59:16 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan13V112 Sat Jul 5 18:02:25 CDT 2008.