Calculated field syntax question

chuck hinkle chuckbo at hinkles.us
Fri Jan 9 21:02:11 CST 2004



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

chuck


||  Chuck Hinkle  [INTJ]
||  chuckbo at hinkles.us
||  <http://www.hinkles.us/chuckbo/>
||
||  "Perception is usually more persuasive than reality."




More information about the Valentina mailing list