len-morgan
asked this on September 19, 2009 15:33
I created what I thought would be the simplest stack to start actually doing work with SQL Yoga. It consisted of a couple of buttons. The first one was just to do the dbobject_createObject. I can't get past this first step!
I get the message that the handler can't be found. The library IS loaded and shows up in the application browser. If I try to load the library in the IDE it tells me it's build 4 (and I believe the latest version was 5 beta but I used the link in your email and downloaded what I thought was the latest.
When I tried to type "dbobject_create" (the old way) in the message box, I did not get an error but it didn't work either. When I press the button I mentioned above, it throws the "handler not found" message.
What have I messed up? Do I possibly need to set the DatabaseDrivers path?
len morgan
Comments
Nevermind...for now. The problem is I read the documentation just like it was written. In step 1) Create a Database Object is shows the following code:
dbobject_createObject
put the result into theError
This doesn't work. You need parameters. It's not until you get to step 3 that it shows a real example of how to use the command. I was following the instructions like a sheep and that was my mistake.
len morgan
There seems to be something wrong with the forum software. There was another answer (between my two) and as soon as I posted a reply, his disappeared.
len
Hi, yes, that was me, I realized that my example was using slqite and was very different than probably what you were doing.
It took me a while to get a working connection, (no data or tables, just an sqlite db connection with no errors)
I found that I had difficulty loading a different stack, because it remained in memory, even after removing from memory.
So I had to quit, the UI and reload it,
Once I did that I was able to get the example to work, if you want to see it, it is very basic, just for testing.
http://www.software.on-rev.com/testsql.rev
click on link and save as
reelstuff,
Did you remove your first post here? When I replied, it seemed to disappear and was replaced by my reply. Odd if you didn't delete it.
It took me a while to figure out that you were using sqllite and not SQL Server. I'm still having trouble getting things to work but I think my problems are related to getting things in the right places. SQL Yoga is built on top of the revDatabase library and therefore needs access to the Database Drivers folder.
I've also got the libSQLYoga loaded (as shown by the Application Browser) but when I try dbobject_createObject, I get a "handler not found" error. I just don't know how to proceed from this point. I'm totally lost!
len
Did you remove your first post here? When I replied, it seemed to disappear and was replaced by my reply. Odd if you didn't delete it.
Yes I did as I felt my example would not help you, ( Looks like I was right, LOL)
It took me a while to figure out that you were using sqllite and not SQL Server. I'm still having trouble getting things to work but I think my problems are related to getting things in the right places. SQL Yoga is built on top of the revDatabase library and therefore needs access to the Database Drivers folder.
snip,
Not too familiar with MSSQL but I know on remote connections at least using MySQL, you can add a wild card in the control panel.
Hi Ien,
I had the same problem, but now it's OK sql Yogo work. What kind of database do you use?
For me it was a database MySql on localhost, but i thonk you will not problem with sqlite
I need to interface to MS SQL Server on a remote database (actually, not THAT remote but on a different machine with a different IP address at least).
Len - dbobject_createObject doesn't necessarily need the parameter that names the Database object UNLESS there is already a Database object that has been created that is named "default".
For example, if you have the sample French Regions example open and try to call dbobject_createObject then an error would occur because a Database object named "default" already exists. You could check this by calling dbobject_exists("default")
http://www.bluemangolearning.com/revolution/docs/sql_yoga/api_docs/Documents/stack_libSQLYoga_function_dbobject_exists.htm
If you launch a fresh copy of Revolution, open the SQL Yoga stack and start using it does dbobject_createObject work?
Trevor,
This was my (stupid) mistake. I was reading too fast. The first (step 1) command is dbobject_CreateObject and the 3rd step was dbconn_createObject.
I'll try what you suggested when I get home tonight.
len