April 26, 2024, 10:06:58 PM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


A Database Example-not finished but

Started by peterpuk, March 25, 2007, 08:03:18 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

peterpuk

March 25, 2007, 08:03:18 AM Last Edit: March 25, 2007, 07:43:46 PM by peterpuk
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.


Peter

Haim


peterpuk

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.
Peter

pistol350

It's realy a nice code.
Thank you for sharing.
cheers!
Regards,

Peter B.