|
| Access datasource |
 |
Sat, 29 Mar 2008 12:14:28 +000 |
I need help with this:How do I rewrite this selectcommand:
SelectCommand='SELECT [LogEntryID], [Datum] & " " &
[Beskrivning] AS ListText, Left(ListText,25) AS ListBox FROM
Loggposter ORDER BY [Datum] DESC'>so it works with this WHERE statement:
WHERE (UserID = '" + userID + "')
|
| Post Reply
|
| Re: Access datasource |
 |
Sat, 29 Mar 2008 17:25:05 +000 |
Handle the Selecting event of the data source control and change the
SelectCommand.
|
| Post Reply
|
| Re: Access datasource |
 |
Sat, 29 Mar 2008 17:33:12 +000 |
SELECT [LogEntryID], [Datum] & " " & [Beskrivning] AS
ListText, Left(ListText,25) AS ListBox FROM Loggposter WHERE
(UserID = ?) ORDER BY [Datum] DESC
Then you need to add a parameter to the SelectCommand:
SelectCommand.Parameters.Add("UserID", OleDbType.Int).Value = UserID
|
| Post Reply
|
|
|
|
|
|
|
|
|
|