Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 22nd, 2024, 11:57 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: master-detail sync using pagination
PostPosted: December 11th, 2005, 9:19 am 
Offline

Joined: February 4th, 2005, 5:59 am
Posts: 81
Location: Bristol, UK
Don't know if this is of use to anyone... It's a master-detail form with syncing - I intended to do a full CRUD (Create, Read, Update, Delete), but I'm afraid I didn't get any further than read.



To run, alter the paths in the dsn file and at the beginning of the script to point to your own directories etc...

Might be a useful example or maybe someone might want to continue with it...

:D

Melanie

PS. Just remembered, I based it on Scriptdbexample3 from the database tutorials on this site - but I found a fencepost error in the original script -

Quote:
function Next()
{
var num_records = records.GetNumberOfRecords();
if (Start_Record_Num + 5 < num_records) { // Check there are 5 more records
Start_Record_Num += 5;
}

ShowRecords();


My version is:-

Quote:
function nextEmps()
{
// var Numberofemps = Remp.GetNumberOfRecords();
if (Emppointer + 5 <= Numberofemps) { // Check there are more records - Emppointer + 4 are currently showing
Emppointer += 5;
} else {
empinfotext.SetSelection(0,-1);
empinfotext.ReplaceSelection("At last employee for this department");
wait(2);
empinfotext.SetSelection(0,-1);
empinfotext.ReplaceSelection("");
}

showEmps();


The bit I'm talking about is "Start_Record_Num + 5 < num_records" which generates a fencepost error if you have 6 records (1 more than the pagination). Mine uses less than or equal to "Emppointer + 5 <= Numberofemps". Perhaps somebody can doublecheck this?

Apologies if any of this has been covered before and I'm duplicating effort - I haven't caught up with all the posts since I've been away.

Best wishes,

Melanie :D
Image


You do not have the required permissions to view the files attached to this post.

_________________
Win XP, 3.4 HT P4, 1GB ram, Nvidia Geforce 6610 XL, DirectX 9.0c
Opus Pro 04 XE version 4.50
Opus 2.81


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 49 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group