Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently January 10th, 2025, 5:12 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: Retriving text from a database? Or... ?
PostPosted: September 9th, 2006, 8:32 pm 
Offline

Joined: October 25th, 2004, 1:21 pm
Posts: 424
Location: West Lancs, UK
Opus: 7
OS: Xp, Win7
I'm used to making text-based multimedia presentations that my clients use to play to their customers.

I put a utility screen somewhere where my client can customise the presentation... add the customer's name, company etc. This info is saved as a text file on the client's pc.

So when the presentation runs, it says "Presentation to Eric Bloggs, A Very Large Corporation"

Now I'm wondering about allowing my client to change more text in the presentation. My current method seems ok for odd one-off sentences, but cumbersome for loads of them.

So: Could I have the text in a database that client could open and amend?

Or how else might I do it?

Thanks, Linda

_________________
Linda Rossiter, Rossiter & Co

Pro 8, Pro 7, Pro 6, Pro 05.5XE, Pro 04XE, XE2.8, ILM 4.5 on Win7 Professional


Top
 Profile Visit website  
 
 Post subject:
PostPosted: September 9th, 2006, 8:57 pm 
Offline

Joined: October 25th, 2004, 1:21 pm
Posts: 424
Location: West Lancs, UK
Opus: 7
OS: Xp, Win7
So I've started to think about this some more. Bear in mind that I've not used a database in years.

I currently have a database that looks like this (attached)

I've got Opus to connect to the database.

Now I want the four lines of text to come on on-screen.

So I do a database query:
SELECT `Field1` FROM `Table1`
WHERE `Field1` IS NOT NULL

And I make a variable for Field1 called Field1.

Then I can put a text box on screen with the variable Field1.

But this only gives me the first sentence.

How do I then show the second sentence?

If I just say "next record" then it changes the first sentence too.

Do I have to put the text in the database into different fields, rather than the same field? Then I'd end up with a huge horizontal database... not easy to manage.

More clues, please!


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

_________________
Linda Rossiter, Rossiter & Co

Pro 8, Pro 7, Pro 6, Pro 05.5XE, Pro 04XE, XE2.8, ILM 4.5 on Win7 Professional


Top
 Profile Visit website  
 
 Post subject:
PostPosted: September 9th, 2006, 9:12 pm 
Offline

Joined: October 25th, 2004, 1:21 pm
Posts: 424
Location: West Lancs, UK
Opus: 7
OS: Xp, Win7
I appreciate that I only ever write when no one's here... and thus talk to myself... but I think that the answer is that the first screen of text will all be on one row in the database, then the next Opus screen will move on a record, and display row two's text.

Anyone see the flaw in this before I keep going with this method?

And... how does the database get distributed on publication? Do I just put it in the publication folder? How does it get found?

Thanks, Linda

_________________
Linda Rossiter, Rossiter & Co

Pro 8, Pro 7, Pro 6, Pro 05.5XE, Pro 04XE, XE2.8, ILM 4.5 on Win7 Professional


Top
 Profile Visit website  
 
 Post subject:
PostPosted: September 10th, 2006, 12:53 am 
Offline

Joined: October 25th, 2004, 1:21 pm
Posts: 424
Location: West Lancs, UK
Opus: 7
OS: Xp, Win7
So far it all works... Opus screen one has four variable text fields, filled from four fields in row one of the database.

Now ... currently, Opus just shows these variable text fields with a one sec show, followed by a one sec delay in between.

But, say one of the fields, field 3, in the database is blank. Deliberately blank.

Then, there's a three second gap between seeing, say, lines 2 and 4.

How could I get round that? Opus would have to
a) know that the database field was blank
b) not create a variable from the blank field
c) not show the text box that contained that blank field.

At 1am on a Sunday morning, this is now beyond me.... !!!

Actually, to know that the field in the database was blank... currently I've just got one query covering all the fields.

So would I have to have one query for each field - or even two, one to set a variable if it were null, and one if it weren't?

Do feel free to join in!

Linda

_________________
Linda Rossiter, Rossiter & Co

Pro 8, Pro 7, Pro 6, Pro 05.5XE, Pro 04XE, XE2.8, ILM 4.5 on Win7 Professional


Top
 Profile Visit website  
 
 Post subject:
PostPosted: September 10th, 2006, 1:19 am 
Offline

Joined: October 25th, 2004, 1:21 pm
Posts: 424
Location: West Lancs, UK
Opus: 7
OS: Xp, Win7
Right... you can ignore all the rest of this now.

Just one question needs answering:

How can Opus detect if a variable is empty?

Thanks!

_________________
Linda Rossiter, Rossiter & Co

Pro 8, Pro 7, Pro 6, Pro 05.5XE, Pro 04XE, XE2.8, ILM 4.5 on Win7 Professional


Top
 Profile Visit website  
 
 Post subject:
PostPosted: September 10th, 2006, 2:57 am 
Offline

Joined: November 28th, 2004, 6:05 am
Posts: 141
Location: USA
Hi Linda

If your using script


if(!VarName)
{
//Action Here
}


If your using the "if" action
just leave the "compare with" blank

HTH
Chris

_________________
Opus Resources and Services


Top
 Profile Visit website  
 
 Post subject:
PostPosted: September 10th, 2006, 8:17 pm 
Offline

Joined: October 25th, 2004, 1:21 pm
Posts: 424
Location: West Lancs, UK
Opus: 7
OS: Xp, Win7
Chris,

Can I do the same thing without script?

_________________
Linda Rossiter, Rossiter & Co

Pro 8, Pro 7, Pro 6, Pro 05.5XE, Pro 04XE, XE2.8, ILM 4.5 on Win7 Professional


Top
 Profile Visit website  
 
 Post subject:
PostPosted: September 11th, 2006, 2:50 am 
Offline

Joined: November 28th, 2004, 6:05 am
Posts: 141
Location: USA
Hi Linda

Yes, this action will check if the variable <b> is empty

.


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

_________________
Opus Resources and Services


Top
 Profile Visit website  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 63 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:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group