>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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only