[VXCMD] 310 error with encrypted fld

Ron rbarber at yhb.att.ne.jp
Thu Mar 20 21:45:53 CST 2003


Hi Ruslan
I'm sorry to bother you about this again, but I can't seem to get it to
work. I am using VXCMD 1.9.7 VXCMD_Classic_MC and Rev. 2.0 prebeta 4. I have
installed the code resource into the app. I have 2 sets of buttons. One set
makes a Val db and opens it. The other set makes a Val db with one encrypted
fld and tries to open it. The script below fails when it calls
"Field_SetEncryption" with error 310. Before throwing that error, it returns
a good dbRef, boref, and fldref.




on mouseUp
  global dbRef,cursorRef
  
  put cd fld "sql" into theSQL
  answer file "what"
  if it is not "" then put it into thefile
  put revmacfromunixpath(thefile) into thefile
  put Valentina("DataBase_OPEN",theFile) into dbRef
  
  if (dbRef contains "ERROR") then
    answer dbRef
    exit mouseup
  end if
  -------------------------------
  if (dbRef is empty) then
    answer "There is no opened database."
    if not(cursorRef is empty) then
      get Valentina("Cursor_Remove",CursorRef)
      put "" into CursorRef
    end if
    -------------------------------
    if (dbRef is not empty) then
      get Valentina("DataBase_Close",dbRef)
    end if
     
    exit mouseUp
  end if
  
  put Valentina( "Database_GetBaseObjectRef", dbref, "bible" ) into boref
  put Valentina( "BaseObject_GetFieldRef", boref, "verses" ) into fldRef
  get Valentina( "Field_SetEncryption", fldRef, "keyword" )
  
  
  put  Valentina( "Database_SQLSelectRecords",dbref,thesql) into thetext
  
 put thetext into cd fld "verses"
  if (dbRef is not empty) then
    get Valentina("DataBase_Close",dbRef)
  end if
end mouseUp

thanks
Ron



More information about the Valentina mailing list