Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Locking VFP records in ASP.NET
Message
 
 
À
17/09/2008 12:06:16
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01348296
Message ID:
01348300
Vues:
19
Great question. I believe it was asked here two times and no solution was found how to retrieve output parameter from SP called by OleDB in .NET

>We have an ASP.NET application that writes records into Visual Foxpro tables. We use an "ID" table that has a record for every table for the purposes of assigning the next primary key for a given table. Previous we used code much like:
>
>
>
>lnNextid = 0 
>LOCATE FOR id.tablename = lcTable
>IF !EOF()
>     if RLOCK()
>        lnNextid = id.keyvalue
>        replace id.keyvalue with lnnextid + 1
>    endif
>endif
>return lnNextid
>
>
>The problem is in ASP.NET with ODBC connection we have no way of locking the record (that i know of) to make sure two users do not happen to similtaneously call our newid function and receive a duplicate key.
>
>What would be the best way of grabbing and updating these primary keys from an ASP.NET application?
>
>Thanks in advance!!!
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform