Problem concatenating alpha fields... 
Author Message
 Problem concatenating alpha fields...

Maybe it's just me, but it seems the simplest problems give me the most grief.  I'm
using Paradox 5.0 with Windows 95.  I am using a script to create a field combining last
and first names.  The problem is that when I run the script, things lock up. I don't
lose the keyboard, but all I can do is end the task by doing a CTRL+ALT+DEL.  When I
used msgInfo to display the key field (IDNUM A6), it looks like the program gets stuck
on the same record and can't get past it.  If I delete the record and start over, it
will get a little farther and then lock up again.  The script I'm using is listed below.
The fields are defined as:
        Full Name       A       30
        LAST_NAME       A       30
        FRST_NAME       A       30

method run(var eventInfo Event)
        var
                clientTC  TCursor
        endvar

        clientTC.open("client.db")
        clientTC.edit()

        scan clientTC:
                clientTC."Full Name" = clientTC.LAST_NAME + clientTC.FRST_NAME
        endscan

        clientTC.endEdit()
        clientTC.close()
endmethod

I feel like I must be doing something really stupid, but I can't for the life of me
figure it out.  Any help would be greatly appreciated.

Thanks.

Yours truly,

Mark Blasingame



Sun, 17 Oct 1999 03:00:00 GMT
 Problem concatenating alpha fields...

Quote:

> Maybe it's just me, but it seems the simplest problems give me the most grief.  I'm
> using Paradox 5.0 with Windows 95.  I am using a script to create a field combining last
> and first names.  The problem is that when I run the script, things lock up. I don't
> lose the keyboard, but all I can do is end the task by doing a CTRL+ALT+DEL.  When I
> used msgInfo to display the key field (IDNUM A6), it looks like the program gets stuck
> on the same record and can't get past it.  If I delete the record and start over, it
> will get a little farther and then lock up again.  The script I'm using is listed below.
> The fields are defined as:
>         Full Name       A       30
use Full_Name A 60
>         LAST_NAME       A       30
>         FRST_NAME       A       30

> method run(var eventInfo Event)
>         var
>                 clientTC  TCursor
>         endvar

>         clientTC.open("client.db")
>         clientTC.edit()

>         scan clientTC:
>                 clientTC."Full Name" = clientTC.LAST_NAME + clientTC.FRST_NAME
>         endscan

>         clientTC.endEdit()

use the method
if not clientTc.endEdit() then
        errorShow()
        action( DataCancelEdit )
endIf

- Show quoted text -

Quote:
>         clientTC.close()
> endmethod

> I feel like I must be doing something really stupid, but I can't for the life of me
> figure it out.  Any help would be greatly appreciated.

> Thanks.

> Yours truly,

> Mark Blasingame




Mon, 18 Oct 1999 03:00:00 GMT
 Problem concatenating alpha fields...

sorry ignore last,
use this

.
.

Quote:
> The fields are defined as:
>         Full Name       A       30
>         LAST_NAME       A       30
>         FRST_NAME       A       30

> method run(var eventInfo Event)
>         var
>                 clientTC  TCursor
>         endvar

>         clientTC.open("client.db")
>         clientTC.edit()

>         scan clientTC:
>                 clientTC."Full Name" = clientTC.LAST_NAME + clientTC.FRST_NAME

oops sorry
now do
if not clientTC.EndEdit() then
        errorShow()
        action( DataCancelEdit )
endIf

Quote:
>         endscan

; the next line must be in the scan loop
Quote:
>         clientTC.endEdit()
>         clientTC.close()
> endmethod



Mon, 18 Oct 1999 03:00:00 GMT
 Problem concatenating alpha fields...


Quote:
>Maybe it's just me, but it seems the simplest problems give me the most grief.  I'm
>using Paradox 5.0 with Windows 95.  I am using a script to create a field combining last
>and first names.  The problem is that when I run the script, things lock up. I don't
>lose the keyboard, but all I can do is end the task by doing a CTRL+ALT+DEL.  When I
>used msgInfo to display the key field (IDNUM A6), it looks like the program gets stuck
>on the same record and can't get past it.  If I delete the record and start over, it
>will get a little farther and then lock up again.  The script I'm using is listed below.
>The fields are defined as:
>    Full Name       A       30
>    LAST_NAME       A       30
>    FRST_NAME       A       30

>method run(var eventInfo Event)
>    var
>            clientTC  TCursor
>    endvar

>    clientTC.open("client.db")
>    clientTC.edit()

>    scan clientTC:
>            clientTC."Full Name" = clientTC.LAST_NAME + clientTC.FRST_NAME
>    endscan

>    clientTC.endEdit()
>    clientTC.close()
>endmethod

>I feel like I must be doing something really stupid, but I can't for the life of me
>figure it out.  Any help would be greatly appreciated.

>Thanks.

>Yours truly,

>Mark Blasingame


Why not use a ChangeTo Query to do this job? I did not see a
restriction on records to proces?

Steve Urbach
who believes in KISS
        _
       | \                           Steve Urbach
       |  )erek

  / / /                              http://www.greenduck.com



Mon, 18 Oct 1999 03:00:00 GMT
 Problem concatenating alpha fields...

On Wed, 30 Apr 1997 22:42:14 -0700, James Mark Blasingame

Quote:

>Maybe it's just me, but it seems the simplest problems give me the most grief.  I'm
>using Paradox 5.0 with Windows 95.  I am using a script to create a field combining last
>and first names.  The problem is that when I run the script, things lock up. I don't
>lose the keyboard, but all I can do is end the task by doing a CTRL+ALT+DEL.  When I
>used msgInfo to display the key field (IDNUM A6), it looks like the program gets stuck
>on the same record and can't get past it.  If I delete the record and start over, it
>will get a little farther and then lock up again.  The script I'm using is listed below.
>The fields are defined as:
>    Full Name       A       30
>    LAST_NAME       A       30
>    FRST_NAME       A       30

Just another variation.

Quote:
>method run(var eventInfo Event)
>    var
>            clientTC  TCursor
                snam string
>    endvar

>    clientTC.open("client.db")
>    clientTC.edit()

>    scan clientTC:

                snam = clientTC.LAST_NAME + clientTC.FRST_NAME

                if snam.Size() > 30 then
                        Msginfo("oi?","field won't fit")
                                snam = substr(snam,1,30)
                endif

Quote:
>            clientTC."Full Name" = snam

                ; as per one of the other posts...
                if not clientTC.postRecord() then
                        errorshow("nutz")
                endif
             clientTC.unlockRecord()

Quote:
>    endscan

>    clientTC.endEdit()
>    clientTC.close()
>endmethod

Don't use scan if "full name" is a key field ?

hth

Ian



Wed, 17 Nov 1999 03:00:00 GMT
 
 [ 5 post ] 

 Relevant Pages 

1. Concatenating alpha fields into a report text object?

2. Problem concatenating fields containing @ character

3. Problem Opening Recordset with two fields concatenated As

4. Concatenating datetime field and int field to make a date time

5. Numeric Field to Alpha Field

6. merge alpha field into one memo field

7. converting alpha field to memo fields

8. Concatenating fields

9. Concatenating fields in an SQL statement

10. Set-based solution for concatenated fields

11. concatenate varchar field from multiple rows into one row as a group

12. Group an SQL Stored Procedure concatenating a text field


 
Powered by phpBB® Forum Software