Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP&SQL Server 7 Greeny question
Message
From
30/06/1999 15:46:07
 
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00236107
Message ID:
00236121
Views:
10
>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform