Code: Select all
revMoveToNextRecord theCursor
Code: Select all
answer "The name is" && theName
Please provide the missing code to put the value from the record pointed by the cursor into the variable.
Best
greg falda
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Code: Select all
revMoveToNextRecord theCursor
Code: Select all
answer "The name is" && theName
Well, I'll start off by telling you I don't know what you mean.I have a database cursor
Code: Select all
function dbQueryToCursor pConnectionID, pQuery
local tCursor
put revQueryDatabase( pConnectionID, pQuery ) into tCursor
if tCursor is an integer then
else
answer error "The cursor has not been created from query - message: " & tCursor & "..."
answer error "The cursor has not been created from query - the result: " & the result & "..."
answer error "The query was: " & pQuery
end if
return tCursor
end dbQueryToCursor
Code: Select all
answer "The full name is" && tFirst && tLast
Code: Select all
put "SELECT first_Name, last_Name FROM personal where active = 1;" into StrSQL
put revdb_querylist(tab,return,MyDBID,StrSQL) into myList
set itemdel to tab
put 1 into myCnt
repeat for each line myLine in myList
answer "The full name in record " & myCnt & " is: " & \
item 1 of myLine && item 2 of myLine & "."
add 1 to myCnt
end repeat
Code: Select all
put "REPLACE INTO personal (full_Name) VALUES " & CR into StrSQL
replace comma with space in myList
put "(" before myList
put ");" after myList
get revdb_execute(myDBID,(StrSQL & myList))
Code: Select all
put "SELECT * FROM personal where active = 1;" into StrSQL
put revdb_querylist(tab,return,MyDBID,StrSQL) into myList
Code: Select all
revDatabaseColumnNamed(tCursor,"fieldname")
Code: Select all
answer "revDatabaseColumnNamed(tCursor,'fieldname') = " & revDatabaseColumnNamed(tCursor,"fieldname")