Using Valentina Database

Creating desktop or client-server database solutions?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
jharris
Posts: 84
Joined: Wed Jan 26, 2011 3:28 am

Using Valentina Database

Post by jharris » Fri May 27, 2011 1:44 pm

Does anyone use Valentina database? I tried it a couple of months ago and never could get it to open. I looked at it again last night.

When I try using revOpenDatabase("valentina"....

It returns "Invalid Database Type".

If anyone has a snippet of code to connect I sure could use it. The dictionary example doesn't seem to work for me.

jharris
Operating System: macOS Monterey Version 12.5
LiveCode Version: 9.6.8

BvG
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1239
Joined: Sat Apr 08, 2006 1:10 pm
Contact:

Re: Using Valentina Database

Post by BvG » Fri May 27, 2011 4:42 pm

This might b eastupid question, but did you buy and install a valentina database? because it won't work otherwise :)
Various teststacks and stuff:
http://bjoernke.com

Chat with other RunRev developers:
chat.freenode.net:6666 #livecode

jharris
Posts: 84
Joined: Wed Jan 26, 2011 3:28 am

Re: Using Valentina Database

Post by jharris » Fri May 27, 2011 5:08 pm

Hi BvG,

Yes I did...

I installed it and Valentina Studio Pro. I made a simple database with Studio Pro and saved it to my desktop.

Just trying to open a connection to it right now with revOpenDatabase, but always get the same error.

jharris
Operating System: macOS Monterey Version 12.5
LiveCode Version: 9.6.8

rainforestinn
Posts: 8
Joined: Sun Aug 03, 2008 4:00 pm

Re: Using Valentina Database

Post by rainforestinn » Tue Mar 27, 2012 10:06 pm

I just noticed this post from last year which no one answered. jHarris - please look at the valentina examples. They are hidden in a folder called "Paradigma" with subfolder "Examples". You can also go on the valentina site and look at the WIKI but it's written so that only professional programmers can understand it.

OK - next do not use any livecode command at all that begins with "revDatabase" most of them don't work and many end in crashes. I believe at sometime in the past these used to all work for Valentina but they have never been updated. But, not to worry, your valentina install gives you access to a slew of native Valentina commands which work great and fast.

This is an example open database using excellent valentina server:

on DatabaseOpen

get Valentina_InitClient( 10 * 1024 * 1024,serials here3",)
-- new serial numbers added Dec 06, 2010
get Valentina_DebugLevel("kLogParams")
-- first establish connectionRef as gConnection
put VConnection_Constructor("localhost", "sa", "sa", 15432) into gConnection
-- next you establish dbRef as gDatabase
put VDatabase_Constructor( gConnection ) into gDatabase

-- without running VConnection_Open the database does not function
--if VConnection_Open( gDatabase ) contains "ERROR" then
--answer error Valentina_ErrString()
--exit to top
--exit DatabaseOpen
--get Valentina_ShutDownClient()
--return empty
--else
--get VConnection_Close( gConnection )
--end if

get VDatabase_DateFormat(gDatabase, "kYMD")
get VDatabase_DateSep(gDatabase, "-")
get VDatabase_Open( gDatabase, b_l_database.vdb )

if it contains "ERROR" then
answer "there was an error in DatabaseOpen"
exit to top
end if
end DatabaseOpen

Good luck and I hope you are still trying out Valentina or perhaps someone else will be helped by this.

sturgis
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1685
Joined: Sat Feb 28, 2009 11:49 pm

Re: Using Valentina Database

Post by sturgis » Tue Mar 27, 2012 10:29 pm

I think that to use valentina you must have the valentina adk external installed. If you're using it as a client to a valentina server you don't need a serial number. If you wish to use it as a standalone engine (IE no server, similar to using sqlite from within livecode) you DO need to own the adk and use the serial number.

I am pretty sure that valentina is no longer part of the native database support and the adk external needs to be used.

There are different inits, opens etc. when using the adk to access a valentina db. For example if connecting to the external server, its valentina_initclient(cachsize) otherwise its valentina_init(cachesize,serial1,serial2,serial3)
And yep. Once the adk is installed look for the example stacks in my documents/paradigma...

Post Reply