Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Server
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Titre:
Divers
Thread ID:
00285645
Message ID:
00286796
Vues:
15
>
>SQL is in charge of id's. Don't try to do it better, just let SQL do it.
>
>You will be able to drop the ID table in the SQL Database.
>
>None of your stored procedures were upsized BTW. It's all VFP code and not SQL code.
>
>If you added your own SP's you will have to redefine them.
>
>__Stephen

Thanks __Stephen,

I have not added any of my own stored procedures, but kbizobj.OnNew() queries the backend for sp_newid(). I am assuming that there is a store procedure created in SQL Server that handles this. Maybe I am mistaken?

*-------------------------------------------------------
*-- Query the back end data source for the name
*-- of the Stored Procedure that generates the
*-- primary key for the new record and store it in
*-- a cursor named "newid" ... the name of this
*-- procedure is stored in the first field of the cursor
*-------------------------------------------------------
=SQLEXEC(lnHandle, "sp_NewID " + lcBaseTable, "newid")

*--------------------------------------------------
*-- save the name of the field that stores the
*-- signature of the procedure that generates the
*-- primary key for the new record.
*--------------------------------------------------
lcDefaultValue = "newid." + FIELD(1)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform