V4RB and sql question
Ruslan Zasukhin
sunshine at public.kherson.ua
Mon Feb 16 22:50:52 CST 2004
on 2/16/04 9:37 PM, Aaron Bratcher at aaronbratcher at abdatatools.com wrote:
Hi Aaron,
> Why is my insert command failing? It give me an error code of 1?
Strange error code.
This is not Valentina and not MacOS.
Try open this database in viSQL or in Valentina Studio
And do this INSERT there.
What they will say?
> Here's all the code:
>
> dim err as Integer
> dim vdb as vDatabase
> Dim dlg as SaveAsDialog
> dim outItem as FolderItem
> dim sql as string
>
> dlg=New SaveAsDialog
> dlg.promptText="starSecurity.rdb"
> dlg.Title="Create database file"
> outItem=dlg.ShowModal()
> If outItem = Nil then
> return
> End if
>
> Err = ValentinaInit( 5 * 1024 *1024, "", "")
> if Err <> 0 then
> MsgBox "Valentina engine error: " + Str(Err)
> quit
> end if
>
>
> vdb = new VDataBase
>
> if not vdb.Create(outItem,1,32) then
> MsgBox "error creating file"
> return
> end
>
> sql = "create table people (personid varchar, personname varchar,
> address varchar, city varchar, state varchar, zip varchar)"
> err = vdb.sqlExecute(sql)
> if err <> 0 then
> msgBox sql+chr(13)+str(err)
> end
>
> sql = "insert into people
> (personid,personname,address,city,state,zip) values('1','Robert
> Redford','','','','')"
> // also tried this sql
> // sql = "insert into people (personid,personname) values('1','Robert
> Redford')"
> err = vdb.sqlExecute(sql)
> if err <> 0 then
> msgBox sql+chr(13)+str(err)
> end
--
Best regards,
Ruslan Zasukhin [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com
To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------
More information about the Valentina
mailing list