views:

240

answers:

1

I have a SQL table that needs to be queried by the login name. So, using SharePoint designer I successfully created a database connection, but I can't use the properties exposed by Profile nor Session as input parameters because they are not supported (A dialog pops up with a message indicating this)

How else can I query a SQL datasource by using the current login?

-Edit

To create the data connection, proceed as follows

  1. Open the data source library
  2. Expand database connections and click on connect to a database
  3. Enter the database settings
  4. Select "specify custom Select, Update, Insert, and Delete"
  5. Click on Edit Command
  6. Add a parameter and select Profile and enter UserName as the property name

An error will follow stating that this is not supported.

A: 

Unfortunately, you don't give many details but I think you're looking for the LOGON_USER Server Variable: Data View / Data Form: Parameters You Don’t Know About.

Kit Menke
Thanks Kit, it would've been really nice if a SQL data source allowed for Server Variables as parameters. It seems a DataView web part is needed to filter and pass information to other web parts.
AlexanderN
Thanks for the edit. I see what you mean now.. and unfortunately I don't have an answer for doing it using SPD. It seems this might call for a custom web part.
Kit Menke