Barbara,
Thanks, this is pretty much what I have come up with. Since I am using an app role, I can't let the connection close since I will be upgradding the users rights with an approle. What I have resigned to do is give the 'public' role select access to the basic config table. This is the first opened. Once it is opened I run the sp_setapprole stored procedure.
When doing this, have you ever had a connection other than number 1?
Thanks,
BOb
>Bob,
>I have a SQL-Server app that's doing this. The trick is to open the connection early in the application (I use a one-field, one-record table for speed) and store the connection handle as an application property. Then every other table can use the same handle. Works like a dream, although you DO have to check that the handle is still valid, etc. Closing the last shared table closes the connection, although my closing code does check this.
>
>HTH
>Barbara
>
>>Hi All,
>>
>>Is there any way to create a connection with SQLConnect() that will then be used by future opened views that are set to share a connection?
>>
>>I can open view after view, that will all share the same connection... but, I need to create the connection so I can run the sp_setapprole sp, and then have the views use that connection.
>>
>>If anyone knows how to do this, or has another way, let me know!!!
>>
>>BOb
Previous
Next
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