Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP&SQL Server 7 Greeny question
Message
De
30/06/1999 15:46:07
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00236107
Message ID:
00236121
Vues:
11
>I am migrating our app to use SQL 7, the code below works
>fine, but I am concerned about hardcoding the 'DBO.' portion
>of the code (see code below).
>Basically I build a list of all the fields in the table, but prefix the fields with 'DBO.' for the 'UpdateNameList'.
>
>Is this OK to do? And does anyone know how the SQL Server might be configured other than dbo (database owner)?
>
>Thanks for your help
>-Ed
>
>
>
>=CURSORSETPROP('Tables','dbo.' + cFrom)
>FOR nCnt = 1 TO AFIELDS(FList,cCursorName)
> cUpdateNameList = cUpdateNameList + IIF(!EMPTY(cUpdateNameList),",","") + FList(nCnt,1) + " " + "dbo." + cFrom + "." + FList(nCnt,1)
> cUpdateList = cUpdateList + IIF(!EMPTY(cUpdateList),",","") + FList(nCnt,1)
>ENDFOR
>=CURSORSETPROP('UpdateNameList', cUpdateNameList)
>=CURSORSETPROP('KeyFieldList', cKeyFieldList)
>=CURSORSETPROP('UpdatableFieldList', cUpdateList)
>=CURSORSETPROP('SendUpdates',.T.)

You don't need dbo prefix if you set up the default database in your DSN or connection string.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform