Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


dBase III Plus files using SQL

dBase III Plus files using SQL

dBase III Plus files using SQL

I have data stored in dbase III+ file format. The customer still adds and edits these data with a legacy clipper application. Changing to another database it is not an option.

What I need to do is write some small modules that will add/edit/delete these records using ColdFusion as the customers needs browser client assess to these new routines.

I've loaded the stelsDFB driver on the web server and it works fine except this one problem. The supported SQL syntax does not have the Recno() function that dbase and clipper uses for a primary key. Since the database has no auto increment data type I can't find a way to have a primary key.

I'm stuck with the ancient design where the most important tables only have the, RECNO() function result, as the primary key. Thus, how do I delete or update a specific row?

The SQL syntax does have the ROWNUM() function when selecting data but it always returns a null result if you try to filter with it.

select rownum() as recno, lname, zipcode
from myTable

returns the record number just fine but

select rownum() as recno, lname, zipcode
from myTable
where rownum() <= 10

returns an empty set and does not return an error.


Delete from myTable
Where rownum() = 5

deletes no records and terminates without error; as it would if there were no records where where rownum()=5. Of course there is a row 5.

Any ideas on how to emulate a primary key would be much appreciated!


---People Remember about 10% of what you say ---They never forget how you made them feel. Covey

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close