Calculated field syntax question

Ruslan Zasukhin sunshine at public.kherson.ua
Sat Jan 10 09:03:23 CST 2004


on 1/10/04 5:02 AM, chuck hinkle at chuckbo at hinkles.us wrote:

> 
> 
> I guessed at the SQL syntax to create an autonumber field, but I'm getting
> an error 344 (Unique field) whenever I try doing an insert, so I suspect
> that I have this syntax set up incorrectly.
> 
> Can someone lend a hand, please?
> 
> Pic_name = new vvarchar("Pic_name",80,"ASCII", kV_Indexed + kV_Unique)
> HSize = new vushort("Hsize")
> VSize = new vushort("Vsize")
> 
> ' Calculate next largest ID for Pic_ID
> 
> Pic_ID = new vullong("Pic_ID", kV_Indexed + kV_Unique)
> Pic_ID.setmethod("Max(Pic_ID) + 1")
> 
> 
> 
> (It's tough when your knowledge of SQL is based on what Access generates.
> What's a very basic SQL book anyone can recommend to use as a desktop
> reference? Or, a website?)

I think MAX function do not works in the BaseObject methods.
Only as aggregative.

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