Forums/Other/SQL Yoga

Answered

The beta version sql Yoga expired...

Eric
asked this on September 16, 2009 08:28

Hello,

I bought sql Yoga in few weeks and i would like to know how connect my sql database from sql YOGA?

Actualy, i begin a stack new projet and i have a message following : the beta version sql Yoga has expired.

how to register my serial number and where i put sqlyoga_register EMAIL, SERIAL_KEY, is it in stack script and openStack?

About the sql Yoga sample application (download) the database between Rgions and d

 

Comments

User photo
Trevor DeVore
Blue Mango Learning Systems

Hi Eric,

Head on over to the SQL Yoga page and grab the latest download which no longer expires. The documentation has also been updated as well.

http://www.bluemangolearning.com/revolution/software/libraries/sql-yoga/

As for the French Rgions database, can you tell me what is wrong? Are the links between depratments and regions incorrect?

September 16, 2009 11:50
User photo
Eric

hi Trevor,

I have the same problem, i can use sql Yoga, and now sql Yoga sample application don't works for this same problem " the beta version sql Yoga has expired.

I grab the lasted dowload.

I read in documentation how registred my sql Yoga, but i don't use GLX Application also How can i register.

I put this code into stackScript:

on openstack

if "sql_yoga.rev" is not among the lines of the stacksinuse then

start using stack "LibSQLYoga"

end if

sqlyoga_register Myemail,MYserialNumber

put the result into theError

end openstack

and this one in other button

on mouseUp

dbobject_create

put the result into theError

dbobject_set "storage object", the long id of button "DB Storage"

put the result into theError

sqlyoga_register Myemail,MYSERIALNUMBER

put the result into theError

--

dbconn_create "Development", "MySQL"

put the result into theError

if TheError is empty then

dbconn_set "host", "localhost"

dbconn_set "username", "root"

dbconn_set "password", empty

dbconn_set "database name", "XXXXXXX"

end if

dbconn_Connect

put the result into theError

put it into theConnID

--

dbObject_save

put the result into theError

end mouseUp

When i click on i have the message " the beta version sql Yoga has expired, and the custom properties of btn "DB Storage" is empty.

i am very impatient to work with sql YOGA and this week i have a time for

Thanks you for your help,

September 18, 2009 13:35
User photo
Trevor DeVore
Blue Mango Learning Systems

I have the same problem, i can use sql Yoga, and now sql Yoga sample application don't works for this same problem " the beta version sql Yoga has expired. "

Eric,

If you are getting this error then you are not using the latest version of the SQL Yoga in the Rev IDE. If you open the SQL Yoga stack in the Revolution IDE the version is displayed. What does it say?

Also, does downloading and opening the French Regions example from our website work?

I read in documentation how registred my sql Yoga, but i don't use GLX Application also How can i register.

"

You don't need the GLX Application Framework in order to use SQL Yoga. Just make sure you start using the library and then call sqlyoga_register. Your code example should work fine. You should check whether or not theError is empty though as that will alert you if registration failed.

on mouseUp

dbobject_create

put the result into theError

dbobject_set "storage object", the long id of button "DB Storage"

put the result into theError

sqlyoga_register Myemail,MYSERIALNUMBER

put the result into theError

--

dbconn_create "Development", "MySQL"

put the result into theError

if TheError is empty then

dbconn_set "host", "localhost"

dbconn_set "username", "root"

dbconn_set "password", empty

dbconn_set "database name", "XXXXXXX"

end if

dbconn_Connect

put the result into theError

put it into theConnID

--

dbObject_save

put the result into theError

end mouseUp"

The jump from version 0.9 to version 1.0 of SQL Yoga had some API changes which are mentioned in the change log.

dbobject_create is now dbobject_createObject.

dbconn_create is now dbobject_createObject.

The fact that an error was generated when trying to call dbobject_create means you are most likely running the old version of SQL Yoga.

September 18, 2009 13:42
User photo
Eric

Trevor,

Now it's ok i use the new version of SQL Yoga.

I would like to populate a DataGrid, without succeed.

My stack is very simple : one Datagrid table, three buttons : "Sql Yoga initiallze", "populate", "show dbobject_createFromObject"

My code is in stack script:

on openstack

if "sql_yoga.rev" is not among the lines of the stacksinuse then

start using stack "LibSQLYoga"

end if

sqlyoga_register MyMail,MySERIALNUMBER

put the result into theError

## Load Database Object from button that it was stored in

dbobject_createFromObject the long id of button "DB Storage Deux"

put the result into theError

if theError is not empty then

answer "erreur" & theError

end if

createDatabaseConnection

end openstack

on createDatabaseConnection

put dbobject_getConnection("development") into theConnA

if theConnA is not an array then

answer "erreur" & theconnA

end if

dbconn_connect

end createDatabaseConnection

Button "SQL Yga Initialize"

on mouseUp

dbobject_createObject

put the result into theError

dbobject_set "storage object", the long id of button "DB Storage Deux"

put the result into theError

--

dbconn_createObject "Development", "mysql"

put the result into theError

if TheError is empty then

dbconn_set "host", "localhost"

dbconn_set "username", "root"

dbconn_set "password", empty

dbconn_set "database name", "xxxxxxx"

end if

dbconn_connect

put the result into theError

put it into theConnID

--

dbobject_save

put the result into theError

end mouseUp

button "populate"

on mouseUp

PopulateSocietes

end mouseUp

command PopulateSocietes

## Create a SQL Query Object for retrieving regions

put sqlquery_createObject("Client_Tab") into theQueryA

sqlquery_set theQueryA, "order by", "cl_Societe"

sqlquery_retrieveAsArray theQueryA, theDataA

put the result into theError

if theError is empty then

## Array can be assigned directly to a data grid

set the dgData of group "DataGrid 1" of me to theDataA

else

answer "Error populating socit

September 19, 2009 09:37
User photo
Trevor DeVore
Blue Mango Learning Systems

Regarding query not showing in Data Grid - Do you have columns defined in the data grid that match the columns returned from your query? You can see what your query array looks like by using printkeys:

[code]printkeys(theDataA)[/code]

Regarding the French table showing up:

Not sure why "towns" would show up if it isn't in your database. What does the array look like if you call dboject_reloadSchema?

September 19, 2009 15:54
User photo
Eric

Hi Trevor,

Good, now it's working

I can populate my first datagrid with my first sql Yoga query.

In my first handler the code was:

set the dgData of group "DataGrid 1" of me to theDataA

and now is

set the dgData of group "DataGrid 1" to theDataA

When i add in DataGrid my own columms everything right. Very nice

For "towns" in my database , in fact is an error of me. Opening my sql data with soft "Querious" i had import a table "Town"....

As for the French Rgions database, the problems is between the links departments and town. What do you see in your own database. For exemple i leave in town :La Baule and right departement is Loire atlantique, in Sql Sample application departement is Haute Loire.

September 20, 2009 10:41
User photo
Trevor DeVore
Blue Mango Learning Systems

I'm glad you have things working now.

I've updated the French Regions example and uploaded 1.0 build 6. The database I was using was concatenating department id and town id for the links in the regions and departments table. This made it hard to look up a town if you were just viewing a region as you didn't now the department code. I just recreated the database from scratch and it works now.

September 21, 2009 14:15