Information générale
Catégorie:
The Mere Mortals Framework
>
>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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement