nConn = SQLConnect()
SQLExec(nConn,'SELECT suser_sname()','USER')
UserID = USER.EXP
? userid
BOb
>It appears that my understanding of SQLGETPROP() is a tad flawed so I'm hoping someone can shed some light and offer some advice.
>
>My VFP7 app is using a SQL Server back end. When the app loads, a SQLCONNECT() is done without passing any user-id/password info to have the user login to the database. I was expecting to be able to retrieve the current userid by calling SQLGETPROP(nHandle, "UserID"). Apparently this is not the case when SQLCONNECT is used without any arguments. Why is that?
>
>In any case, given that this is the current behaviour can someone recommend how I would be able to retrieve the user id that is in use by the current connection? The reason I'm doing this is to look up the user and/or group name against the table privileges to determine which form buttons are enabled.
>
>Laterness,
>Jon