Click here to Skip to main content
16,005,236 members
Home / Discussions / C#
   

C#

 
GeneralRe: Select Statement Pin
Heath Stewart12-Oct-04 7:13
protectorHeath Stewart12-Oct-04 7:13 
GeneralRe: Select Statement Pin
Mike Dimmick12-Oct-04 2:47
Mike Dimmick12-Oct-04 2:47 
GeneralRe: Select Statement Pin
pat27088112-Oct-04 3:14
pat27088112-Oct-04 3:14 
GeneralRe: Select Statement Pin
Colin Angus Mackay12-Oct-04 3:21
Colin Angus Mackay12-Oct-04 3:21 
GeneralRe: Select Statement Pin
pat27088112-Oct-04 3:45
pat27088112-Oct-04 3:45 
GeneralRe: Select Statement Pin
Heath Stewart12-Oct-04 7:17
protectorHeath Stewart12-Oct-04 7:17 
GeneralRe: Select Statement Pin
pat27088112-Oct-04 7:36
pat27088112-Oct-04 7:36 
GeneralRe: Select Statement Pin
Heath Stewart12-Oct-04 7:52
protectorHeath Stewart12-Oct-04 7:52 
Whether your statement works with or without parameters doesn't matter: NEVER, EVER use concatenated SQL expressions unless you like have credit card numbers stolen, employee hours changed, wages and salaries emailed throughout the company, and entire tables and even databases dropped. One guy who posted shortly after you makes it even easier for crackers since he's running the commands as the 'sa' account (which is even worse since he doesn't have a password for 'sa'). Always use the least amount of privileges required to run a particular command, even with SQL Server CE.

What exception is occuring and on what line? Does the user you're running under have permissions to the database objects required? Are you sure that EngineerUserId is a string (in most database designs anything with "id" is typically an integer or GUID). Are you sure that it's 50 characters wide and that it's an NVarChar (and not a VarChar, "N" means Unicode or "nationalized").

There could also be a problem since your DataSet and DataTable share the same name. If you don't care about the DataSet name, then don't name it (just use default instantiation, i.e. new DataSet()).

This posting is provided "AS IS" with no warranties, and confers no rights.

Software Design Engineer
Developer Division Sustained Engineering
Microsoft

[My Articles] [My Blog]
GeneralRe: Select Statement Pin
pat27088112-Oct-04 8:43
pat27088112-Oct-04 8:43 
GeneralRe: Select Statement Pin
Dave Kreskowiak12-Oct-04 9:07
mveDave Kreskowiak12-Oct-04 9:07 
GeneralRe: Select Statement Pin
pat27088112-Oct-04 9:15
pat27088112-Oct-04 9:15 
GeneralRe: Select Statement Pin
Dave Kreskowiak12-Oct-04 10:16
mveDave Kreskowiak12-Oct-04 10:16 
GeneralRe: Select Statement Pin
pat27088112-Oct-04 10:28
pat27088112-Oct-04 10:28 
GeneralRe: Select Statement Pin
Heath Stewart12-Oct-04 10:53
protectorHeath Stewart12-Oct-04 10:53 
GeneralRe: Select Statement Pin
Dave Kreskowiak12-Oct-04 11:20
mveDave Kreskowiak12-Oct-04 11:20 
GeneralRe: Select Statement Pin
Heath Stewart12-Oct-04 11:49
protectorHeath Stewart12-Oct-04 11:49 
GeneralRe: Select Statement Pin
Heath Stewart12-Oct-04 10:52
protectorHeath Stewart12-Oct-04 10:52 
GeneralRe: Select Statement Pin
pat27088112-Oct-04 11:51
pat27088112-Oct-04 11:51 
GeneralRe: Select Statement Pin
Heath Stewart12-Oct-04 13:45
protectorHeath Stewart12-Oct-04 13:45 
GeneralRe: Select Statement Pin
pat27088112-Oct-04 12:35
pat27088112-Oct-04 12:35 
GeneralRe: Select Statement Pin
Heath Stewart12-Oct-04 13:41
protectorHeath Stewart12-Oct-04 13:41 
GeneralRe: Select Statement Pin
pat27088112-Oct-04 21:26
pat27088112-Oct-04 21:26 
GeneralRe: Select Statement Pin
Heath Stewart13-Oct-04 5:22
protectorHeath Stewart13-Oct-04 5:22 
GeneralRe: Select Statement Pin
pat27088113-Oct-04 6:03
pat27088113-Oct-04 6:03 
GeneralRe: Select Statement Pin
Mike Dimmick12-Oct-04 9:19
Mike Dimmick12-Oct-04 9:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.