Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3368: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3370: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3371: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3372: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
OrbWorks Community Forum • View topic - Database Question ??

Database Question ??

Discuss OrbForms Designer and PocketC Architect

Postby jerryse on Wed Feb 05, 2003 6:56 pm

Hi, first I am not a professional programmer. I run a small
construction company. I have written 2 programs for my foreman and I.
One generates a metal material list, and the other is for job estimates in the field.

Now the question, how do I save this info to a database? There will be a "variable" number of tasks!

I will have:
Date
Department
Job description
Tasks //this may be 3, 4, 5, ...
Hours //tied to task
Total hours
Total cost

Any help will be greatly appreciated.

Jerry
jerryse
 
Posts: 21
Joined: Tue Apr 30, 2002 2:32 am

Postby jims on Wed Feb 05, 2003 7:40 pm

Jerry,

For a how-to on storing data in a database, the Survey example that comes with OrbForms is a good place to start.

For storing a variable number of sub-items like your Tasks in a database, it's probably easiest to just store them in a seperate database. Have a field in the Task structure that tells you the index of the Job that the task is associated with.

later,
jim
jims
 
Posts: 34
Joined: Wed May 22, 2002 4:01 pm
Location: USA

Postby jerryse on Wed Feb 05, 2003 9:57 pm

Thanks Jim

I have been through the survey app several times. (It takes me several times to understand anything these days. :) ) I agree it is a good starting point.

I will look into your suggestion about a seperate database.

Thanks again

Jerry
jerryse
 
Posts: 21
Joined: Tue Apr 30, 2002 2:32 am

Postby troyk9 on Thu Feb 06, 2003 12:02 pm

Jerry,
for the date , dept and job description you may want to consider creating a sruct
ex.
struct Job {
string jobdate;
string jobdescribe;
string dept;
};
If you will work with databases this will place those 3 pieces of data into 1 structure to save
The Job structure will consist of all three pieces of data for each job.
Alternate to this is what I have done with a deivery program I created for my pharmacists and drivers. I use memos instead of databases so that I may hotsynce and print the memos individually from the palm desktop.
I sequntially in your case woul save
Department
Job description
Tasks //this may be 3, 4, 5, ...
Hours //tied to task
Total hours
Total cost
sequentially
when it comes to taks you may wabt to create a loop to record each task and use a word or code to escape the loop or even set the loop variable ahead of time in order that it may repeat itself for the number of tasks netered prior to the loop and save each one as they are entered. A loop within the loop can keep track of the total hours which may even utilize a case statement to determine the cost per task-hour.
Write this on paper in a freehand like graph to get a feel of what I said and I am sure you will be able to create functions/routines for each little part and call each function/routine as it is needed.
This way your memo will show all the data you want for each job and will be printable as well. The system I have for my drivers is a two part system- It asks for the drivers name, then records the customer's name and the number of prescriptions in the delivery, then time and date stamps the data. Records it as a memo with a blank space of nondata to separate records. This becomes beamable to another plam user. The drivers have palms and each gets beamed to them thir own database. The pull records up sequentially until they have the correct record for each patient, they then just record the initials of the recipient and the program then time and date stamps the new data which now consistes of the previous data plus the new info od time delivered, and recipient's initials. At any time I need to see if a delivery went out I can use the plam's universal search to find a name and it will bring up the exact memo within seconds since memos and automatically included in global searches.
I hope this helps
Michael
troyk9
 
Posts: 40
Joined: Mon Sep 23, 2002 12:51 am
Location: USA

Postby jerryse on Thu Feb 06, 2003 12:31 pm

Hi Michael

Actually, I am allready sending it to memo so I can do a little formatting, then beam to an IR printer. I thought it might be cleaner to have its own database. But, you have some interesting ideas. Maybe I am not using the memo DB as well as I should. Especially the global search.

I assume we can not define our own catagories in memo DB from OrbForms?

Thanks for your time

Jerry
jerryse
 
Posts: 21
Joined: Tue Apr 30, 2002 2:32 am

Postby troyk9 on Fri Feb 07, 2003 7:26 pm

Hi Jerry,
Actually the categories to me are meaningless. When using the global search individual records bring up the associated memos regardless of name or category. I donn't knoe if you can categorize while saving to the memo, but you can always do it after the fact, but as I said - I even though I do categorize after the fact for some reason I always have the palm set to all. Maybe it's because I only have 11 memos in it LOL. After I use a memo for the drivers it's hot synced to the computer and printed out. That serves for us to determine their salary. They are individually contracted and paid per drop. I then delete their memos from the palm since I have my hard copy and they have their route.

Michael
troyk9
 
Posts: 40
Joined: Mon Sep 23, 2002 12:51 am
Location: USA

Postby jerryse on Fri Feb 07, 2003 9:20 pm

Hi
11 memos would be very manageable.
The company I work for may not decide to do a certain job for months. And in that time they may offhand want to know how much it was.

For now I am going to just use the memo DB. But, sooner or later I have to jump into databases! And pointers! yeccch

Jerry
jerryse
 
Posts: 21
Joined: Tue Apr 30, 2002 2:32 am


Return to OrbForms Designer and PocketC Architect

Who is online

Users browsing this forum: No registered users and 2 guests

cron