Need help getting data
Information Team
info at castus.com
Thu Mar 6 12:56:43 CST 2008
I want to cycle thru each event Id of presentation
and the elementdata from each recordset that has same eventId of every slide
in the presentation
Im using the Valentina Database
<code>
on pubGetDataName me, intID, ee_eventID
sql = "SELECT * FROM EventElements WHERE EventElements.EventID=" & intID
-- Check for error
objTable = new(xtra "VCursor", GetRef(me.dataObj), sql, 1, 2, 2)
if ValentinaError() then
alert("Error selecting data to fill the events list: " &
ValentinaErrorString())
objTable = void
return FALSE
end if
objWin = me.currentDisplayWindow
objWin.type = #document
objWin.moveToFront()
objEvent = me.eventsList[me.intPage]
me.event_current = objEvent
intCount = objTable.GetRecordCount()
lstInfo = []
repeat with intNum = 1 to intCount
lstItem = [:]
intID = objEvent.e_id
ee_eventID = objTable.GetField("EventID")
-- ee_data = objTable.GetField("ElementData")
-- strSlide = intID & "_" & ee_eventID
lstItem.setaProp(#event, intID)
lstItem.setaProp(#ee_event, ee_eventID)
lstItem.setaProp(#data, objTable.GetField("ElementData"))
--if objElement.ee_name = "Flash" then
---Kicks out filename of elementdata of current screen
the moviePath & "templates\flash\" & objTable.GetField("ElementData"))
-- end if
-- Add the listItem to lstInfo
lstInfo.add(lstItem)
-- Grab the next record
objTable.NextRecord()
end repeat
objTable = void
----- Original Message -----
From: "Thorsten Hohage" <thohage at objectmanufactur.com>
To: "Valentina Developers" <valentina at lists.macserve.net>
Sent: Thursday, March 06, 2008 5:44 AM
Subject: Re: Need help getting data
> Hi,
>
> I really didn't know what you "really" want to know, but
>
> On 2008-02-06, at 03:15, Information Team wrote:
>
>> I need to get event Id from current presentation and get the ElementData
>> info from database and show all "ElementData" records that correlate
>> with the event ID in the EventElements Table
>>
>> <code>
>> SELECT EventElements.EventID, EventElements.ElementData
>> FROM EventElements;
>> </code>
>
>
> so when you want to get only records that match the ID criterie, then you
> must use a "where"-Clause (this should give you a good start in wiki or
> samples).
>
> In your given example it would perhaps looks like
>
> SELECT ElementData FROM EventElements where EventID = 4711;
>
> In most "API"s of Vaentina you've got the option to define the query with
> a parameter and then set the parameter again and again to retrieve the
> data. But I didn't know enough of Director to give you a sample here.
>
>
> regards
>
> Thorsten Hohage
> --
> objectmanufactur.com - Hamburg,Germany
>
>
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina
More information about the Valentina
mailing list