Newbie

Youri lystes at free.fr
Sun Oct 22 12:05:31 CDT 2006




Ruslan,



Ruslan Zasukhin wrote:

>> I have tried the example at :
>>
>> <http://www.valentina-db.com/dokuwiki/doku.php?id=paradigma:public:en:document
>> ation:v4rb:tutorial:lesson1>
>>
>>
>> I have created the project myself, I downloaded the finished project
>> also and it fails every time I try to launch it in the following method :
> 
> Which project fails? Your or our?


My config is RB 2006 r4 under OS X 10.4.7 iMac G5.

Your file downloaded "lesson 1 step 6" fails at the Open event of
Window1 see bellow :

   // If Database exists we open it, otherwise we create it.
   try
     mDatabase.Open( f ) ---> FAILS!
   catch err as VException
     mDatabase.Create( f, EVDbMode.kDscDatBlbInd )
     CreateStructure()
   end


> If your ... Then may be you have not made Valentina.Init ?

It is done.

Lesson 2 also has bugs :


Window1.close

Should be :   if app.mClient then


Window1.open

Fails at :

   if( app.mClient ) then
     mConnection = new VConnection("localhost", "sa", "sa" )
     mConnection.Open() -------> FAILS!
     mDatabase = new VDatabase( mConnection )
   else
     mDatabase = new VDatabase()
   end

Also :

Autoincrement Example :

MainWindow1.PushButton1.action

Fails at :

   result = mDatabase.SQLExecute( "ALTER TABLE Person ADD CONSTRAINT 
PK_Person PRIMARY KEY (id) " )


Once you've added records to the DB


> I will ask our developers check V4RB tutorial files from site
> To be sure they are up to date.

Thank you.


> Also take a look at V4RB FAQs in our WIKI,
> And I want to make sure that REALbasic see Valentina okay. Here
> 
> http://www.valentina-db.com/dokuwiki/doku.php?id=paradigma:public:en:documen
> tation:v4rb:manual:installation:installation
>  
> Is described how to check that REALbasic have recognize Valentina
> 
> 
>> dim f as FolderItem
>> f = GetFolderItem( "dbPersons.vdb" )
>> mDatabase = new VDatabase
>> // If Database exists we open it, otherwise we create it.
>> try
>>      mDatabase.Open( f )
>> catch err as VException
>>      mDatabase.Create( f, EVDbMode.kDscDatBlbInd )
>> end
>>
>>
>>
>> Is there any other source of documentation to start from scratch?
> 
> Tutorial is the SIMPLEST thing we have.

I am trying with it.

>> Everything seems very complicated to start. For instance I found on V4RB
>> Reeference.pdf the Init method.
>>
>> It says : inCacheSize   The size of the database cache in bytes.
>>
>> And the example is
>> Valentina.Init( 5 * 1024 * 1024 )
>>
>> Why expressing the size this way? No explanation is provided for a
>> newbie like me.
> 
> Youri, but 5 * 1024 * 1024 - this is really basic thing.
> 
> We cannot explain in DBMS docs such simple things as what
> is Megabyte, what is a byte, what is a bit,
> what is HEX numbers and what is binary numbers.
> This is a basic we expect everybody knows.

I understand this Ruslan, I was just asking if it was a special request
from Valentina point of view to have the DB cache size to be sized this
way. As long as it is not said in the example.





More information about the Valentina mailing list