vCOM Create Table

Brandon Warlick bwarlick at sunbelt-graphics.com
Wed Dec 13 12:10:11 CST 2006


I fixed the code. Same thing as before. When I create a db it is created on
the hard drive. When I attempt to open it with vStudio nothing happens. No
error, just no database appears after it is opened.

By the way, "v.init 10" was in the example you provided called
"\Valentina\vCom\VCOM_WIN\Examples\VisualBasic\sql_create_db".

Also, v.Init 4 * 1024 * 1024 causes an overflow error in vb. 

Here is the new code I used to test:

    Dim V As New Valentina
    V.Init 9 * 1048576      
    
    Dim Db As New VDataBase
    
    Db.Create "c:\temp\sample.vdb"
    
    Dim sql As String
    sql = "CREATE TABLE tbl1 ("
    sql = sql + "fldString string(20, 'ASCII') NOT NULL) "
    Debug.Print sql
    Db.SqlExecute sql
    Db.Close
        
    V.ShutDown

-----Original Message-----
From: valentina-bounces at lists.macserve.net
[mailto:valentina-bounces at lists.macserve.net] On Behalf Of Ivan Smahin
Sent: Wednesday, December 13, 2006 10:01 AM
To: Valentina Developers
Subject: Re: vCOM Create Table


Hello Brandon,

Wednesday, December 13, 2006, 9:28:06 PM, you wrote:

> I am experimenting with vcom using vb. When I create a db it is 
> created on the hard drive. When I attempt to open it with vStudio 
> nothing happens. No error, just no database appears after it is 
> opened.

> Here is the test code:
>       
>     Dim V As New Valentina
>     V.Init 10

      10 is too small cache.
      
      V.Init 4 * 1024 * 1024
>     
>     Dim Db As New VDataBase
>     
>     Db.Create "C:\temp\sample"

      Db.Create "C:\temp\sample.vdb"
>     
>     Dim sql As String
>     sql = "CREATE TABLE tbl1 ("
>     sql = sql + "fldString string(20, 'ASCII') NOT NULL) "

>     sql = sql + "fldString string(20) NOT NULL) "

>     Debug.Print sql
>     Db.SqlExecute sql
>
      You forget:
      Db.Close
      
>     V.ShutDown

> Thanks,

> Brandon

> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net 
> http://lists.macserve.net/mailman/listinfo/valentina


-- 
Best regards,
 Ivan                            mailto:ivan_smahin at valentina-db.com

_______________________________________________
Valentina mailing list
Valentina at lists.macserve.net
http://lists.macserve.net/mailman/listinfo/valentina



More information about the Valentina mailing list