Am 11.06.2006 um 01:20 schrieb Sarah Reichelt:

I made my stack "xyz" with mc 2.6.1. Then I opened it in rev 2.7.1 to
connect it to a SQL-database.
In the stackscript of "xyz"  I put the same code as  in the stack
"SQL-Test" I made with rev directly.
The stack "SQL-Test" connects well to its database, but in my stack
"xyz" this code don't work.

Here it is:

on preopenstack
     global gConID
     put revdb_connect("sqlite3","DB_FLK.db",,,,,"my emailadress","my
password") into tConID
   if tConID is "" then
     answer warning "Problem creating or accessing database!"
   else
     answer information "DB_FLK Connected! Your connection ID is: " &
tConID
     put tConID into gConID
   end if
end preopenstack

When I create a button in the opened stack with the same code I get a
connection to the database.
Do anybody knows a help?

I think that when you try to open the database in your preOpenStack
handler, the database library has not yet been loaded. Try setting up
a delayed call to open it e.g.

on preOpenStack
  send "connectToDatabase" to me in 1 second
end preOpenStack

on connectToDatabase
    global gConID
    put revdb_connect("sqlite3","DB_FLK.db",,,,,"my emailadress","my
password") into tConID
  if tConID is "" then
    answer warning "Problem creating or accessing database!"
  else
    answer information "DB_FLK Connected! Your connection ID is: " &
tConID
    put tConID into gConID
  end if
end connectToDatabase

HTH,
Sarah

I am sorry, it don't helps. I even set the latency to 10 seconds.There must be an other cause apparently.

:-(
Reinhold
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to