director cannot execute sql query

Ruslan Zasukhin sunshine at public.kherson.ua
Tue Oct 21 19:09:37 CDT 2003


on 10/21/03 18:54, Babon Support at ricky at babonmultimedia.com wrote:

> hello i need help, i try to create db and also process query from member
> i think there's some error in docreate but i dunno
> 
> thanks in a bunch
> Ricky
> 
> on docreate
>   set db = 0
>   set dvcursor = 0
>   sql = member("sql_query").text
>   set db = new( xtra "VDataBase" )
>   CreateDatabase( db, member("db_name").text, 1)
>   set dbvcursor = new( xtra "Vcursor",GetRef(db),sql,1,3,1)
>   alert sql "" && dbvcursor
> end
> 
> the query is:
> CREATE TABLE data
> (
> fd_Code varchar(20) UNIQUE INDEXED NOT NULL,
> fd_Name varchar(50) NULL,
> fd_Size varchar(50) NULL,
> fd_Colour varchar(50) NULL,
> fd_MinOrder varchar(20) NULL)

You need create cursor Xtra only for SELECT query.

For rest you need call db.SqlExecute( sql )


-- 
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