trouble with standalone valentina

Robert Mann robmann at gp-racing.com
Tue Aug 28 18:03:33 CDT 2007


My application works fine in development mode but when I build the
standalone and test that database does not seem to get updated?

When the user opens the app it checks to see that they have registered if
they have it opens if not they have to click a register button, when they do
it sends then to a online rev app to complete the registration after they
complete it will log the new registration number in the online database
(mysql) and there local database (valentina), this work fine in development
mode but not the standalone. With the standalone it completes the
registration and as lone as you do not close the app it continues to see tha
t it is registered but as soon as you close and reopen then app it ask the
user to register again, so not sure what is going on, check the local
database and it is empty but the online has the registration number in it, 

Below is the script that I am using not sure how to test this it works every
time in development mode just not as a standalone? 

Thanks

rob

 

global dbID2, guserIDnum, gbase, dbID, gusername, gpassword, greg

 

ON mouseUp

  put "" into fld _status

  IF the optionkey is down THEN

    edit the script of me

    exit mouseup

  END IF

 

     put fld "username" into gusername_# 

    put fld "password" into tpassword

    put md5digest(tpassword) into tMD5

    get binarydecode ("H*",tMD5,tlogin_passwd)

    

    put "Select uid from wt_users Where wt_users.name='"&gusername&"' AND
wt_users.password='"&tlogin_passwd&"' AND wt_users.active='Y' AND
wt_users.banned='N';" into theSQL

    put revqueryDatabase (dbID2, theSQL) into curID2

     

    IF curID2 is not a number THEN

        answer "Please enter the correct login information"

        break

    ELSE

        put revDatabaseColumnNamed(curID2,"uid") into guserIDnum

        -- put guserIDnum into fld "userID"

    END IF

      revCloseCursor curID2

 

  

  --------  MAKE REGISTRATION KEY  --------_# 

  put urlencode(makekey()) into _key

  set the _customKeyVSCR of this stack to _key

 

        put "Select * from registration Where
registration.userId="&guserIDnum&";" into theSQL

        put revqueryDatabase (dbID2, theSQL) into curID2

        put revqueryDatabase (dbID, theSQL) into curID

 

    IF curID2 is a number AND  curID is a number THEN

        put revDatabaseColumnNamed (curID2, greg) into gbase2

        put revDatabaseColumnNamed (curID, greg) into gbase

 

               IF gbase is empty THEN

                  put "UPDATE registration set "&greg&"='"&_key&"' where
userid='"&guserIdnum&"'" into theSQL

                 revExecuteSQL dbID, theSQL

                  put it into terror

 

               ELSE IF  gbase is "N" THEN

                 put "UPDATE registration set "&greg&"='"&_key&"' where
userid='"&guserIdnum&"'" into theSQL

                 revExecuteSQL dbID, theSQL

                 put it into terror

                END IF

       

                          IF gbase2 is empty THEN

                 put "UPDATE registration set "&greg&"='"&_key&"' where
userid='"&guserIdnum&"'" into theSQL

                 revExecuteSQL dbID2, theSQL

                 put it into terror2

 

               ELSE IF  gbase2 is "N" THEN

                 put "UPDATE registration set "&greg&"='"&_key&"' where
userid='"&guserIdnum&"'" into theSQL

                 revExecuteSQL dbID2, theSQL

                 put it into terror2

                END IF

 

                 put "SELECT "&greg&" from registration where
registration.userID='"&guseridnum&"'" into theSQL

                 put revquerydatabase (dbID2, theSQL) into curID2

                 put revQueryDatabase (dbID, theSQL) into curID

                 put revdatabaseColumnNamed (curId2, greg) into treg

                 put revDatabaseColumnNamed (curID,  greg) into treg2

               

                --check to make sure that reg number is in both database

                IF matchtext (treg,_key) AND matchtext(treg2,_key) THEN

                 put "Registration Complete" into fld _status

                       

                  put "" into fld "username"

                  put "" into fld "password"

                  put "" into treg

                  put "" into treg2

                  put "" into greg

                   open card "springcalc" of stack "springcalc"


                  show stack "springcalc"

                  close  stack Registration

                   revclosecursor curID

                  revclosecursor curID2

                  revclosedatabase dbID2

                 close stack "reg_stack"

 

                 

                  ELSE

                  put "error during registration" into fld _status

                          

                 END IF

    

END IF

 

END mouseUp

 



More information about the Valentina mailing list