IonicWind Software

IWBasic => Database => Topic started by: peterpuk on March 25, 2007, 08:03:18 AM

Title: A Database Example-not finished but
Post by: peterpuk on March 25, 2007, 08:03:18 AM
Hi All,

I have been attempting to write a database example that others might find useful, but it is taking too long. I am still learning to do things the EB way.

However I am attaching a download of what I have done just in case it can provide others with ideas. It was going to be a simple Order Entry system, but I have only done Customer Table maintenance. I hope you can follow the code, and I have tried to include remarks that may help.

Some points of interest might be
- how I perform a query on the Customer Table,
- how I delete a customer AND any links found in the Order Header and Order Details Tables (even though there aren't any orders),
- how I managed the ListView to keep it in step,

Be warned though, there might be bugs in the code even though I have done a fair amount of testing. Be sure to let everyone know if you find any. BTW I think I have a duplicate CONST STATIC_30 in the Cust1 window code, but the compiler didn't complain:)

If I had more free time I would finish the example but I can't see this happening :(

Feel free to let me know what you think.

EDIT: I have had to make some changes after testing again with no customer records and have uploaded the zip file again.
In the LoadListView routine the line should be      IF (hStmt) AND rsCount>0
Also changed the STATIC_30 to STATIC_109 to fix the duplicate definition.


Title: Re: A Database Example-not finished but
Post by: Haim on March 25, 2007, 08:30:10 AM
Thanks for sharing this!

Haim
Title: Re: A Database Example-not finished but
Post by: peterpuk on March 25, 2007, 07:46:36 PM
Hi again

My post was a bit premature, but I have made a change to the code. See the EDIT in my first post above, and re-download the zip if you want.
Title: Re: A Database Example-not finished but
Post by: pistol350 on March 26, 2007, 05:52:08 PM
It's realy a nice code.
Thank you for sharing.
cheers!