Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How To Get The Name Of An Auto Increment Field
Message
 
À
24/01/2008 19:01:34
Al Doman (En ligne)
M3 Enterprises Inc.
North Vancouver, Colombie Britannique, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01285380
Message ID:
01285390
Vues:
17
Ok, here's the problem with this.

I'm working on a legacy app. I'm writing a process that automatically inserts records into
a DBF.

There is a default value for the PK field:
new_pk("custpoc","poc_pk")
which calls a stored proc that returns the row's PK value.

My process forms an INSERT statement, which is throwing an error "Uniqueness of index POC_PK is violated."

Not all tables are calling this stored proc, so this presents a problem.

I'm trying to make my process generic so that I can use it in any app. I need a way to
exclude the PK column from the insert statement when this rule is in place.

Anyone?





>>How do I return the name of a table's AutoInc field?
>
>Spin through the results of AFIELDS() or COPY STRUCTURE EXTENDED and look for rows with Step > 0.
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform