Click here to Skip to main content
15,908,776 members
Home / Discussions / C#
   

C#

 
GeneralRe: rtf and streams Pin
panoskatws5-Apr-08 5:16
panoskatws5-Apr-08 5:16 
GeneralThreading problem Pin
Rick van Woudenberg4-Apr-08 2:53
Rick van Woudenberg4-Apr-08 2:53 
GeneralRe: Threading problem Pin
leppie4-Apr-08 3:42
leppie4-Apr-08 3:42 
GeneralRe: Threading problem Pin
SeeBees4-Apr-08 16:15
SeeBees4-Apr-08 16:15 
GeneralRe: Threading problem Pin
S. Senthil Kumar5-Apr-08 13:56
S. Senthil Kumar5-Apr-08 13:56 
Questionis there a way to restrict possible values of a string param in a method Pin
Adam Harbour4-Apr-08 2:40
Adam Harbour4-Apr-08 2:40 
GeneralRe: is there a way to restrict possible values of a string param in a method Pin
Pete O'Hanlon4-Apr-08 2:50
mvePete O'Hanlon4-Apr-08 2:50 
GeneralWrong data returned! Pin
Graham_44-Apr-08 1:24
Graham_44-Apr-08 1:24 
I am using a Data class to return data from SQL server
<br />
 DataSet tpoDataSet = new DataSet();<br />
 command.Transaction = transaction;<br />
 command.CommandText = psSqlStatement;<br />
 command.Connection = ipoConnection;<br />
 adapter = dbProvider.CreateDataAdapter();<br />
 adapter.SelectCommand = command;<br />
 adapter.Fill(tpoDataSet);<br />
            <br />
return tpoDataSet;<br />

Its in a dll which is used across different projects for linking to SQL and has
proven its reliability in the past.
However I am passing a sql string to return information on a table in a database
<br />
"SELECT column_name as colname ,data_type as datatype, " + <br />
"character_maximum_length as CharLen,numeric_precision, " +<br />
"numeric_scale, column_default as defaultvalue , " + <br />
"CASE WHEN COLUMNPROPERTY(object_id(table_name),column_name,'IsIdentity') =1 THEN " +<br />
"'YES' ELSE 'NO' END " +<br />
"as 'IsIdentity', " +<br />
"is_nullable as IsNullable " +<br />
"FROM [" + psTargetDb + "].INFORMATION_SCHEMA.COLUMNS " +<br />
"WHERE TABLE_SCHEMA = 'dbo' " +<br />
"AND table_name <> 'utSqlLog' " +<br />
"AND table_name = '" + tpsTableName + "'";<br />


the problem is with the line
<br />
"CASE WHEN COLUMNPROPERTY(object_id(table_name),column_name,'IsIdentity') =1 THEN " +<br />
"'YES' ELSE 'NO' END "<br />

which is returning 'NO' even if the field is an identity field. If I cut and
paste the query into sql and run it then I get the field values that I would expect! Confused | :confused:
Help appreciated.
GeneralPlugins for MS Office, Internet explorer using C# Pin
Vikas K.4-Apr-08 0:53
Vikas K.4-Apr-08 0:53 
GeneralRe: Plugins for MS Office, Internet explorer using C# Pin
John_Adams4-Apr-08 1:06
John_Adams4-Apr-08 1:06 
GeneralRe: Plugins for MS Office, Internet explorer using C# Pin
Vikas K.4-Apr-08 1:24
Vikas K.4-Apr-08 1:24 
GeneralRe: Plugins for MS Office, Internet explorer using C# Pin
Member 38312474-Apr-08 3:27
Member 38312474-Apr-08 3:27 
QuestionHow to get Keypress event to menuStrip Pin
ASysSolvers3-Apr-08 23:48
ASysSolvers3-Apr-08 23:48 
GeneralBLOB reading and writing C# Pin
Dev Motiramani3-Apr-08 23:25
Dev Motiramani3-Apr-08 23:25 
GeneralRe: BLOB reading and writing C# Pin
Giorgi Dalakishvili3-Apr-08 23:32
mentorGiorgi Dalakishvili3-Apr-08 23:32 
GeneralRe: BLOB reading and writing C# Pin
Dev Motiramani4-Apr-08 0:06
Dev Motiramani4-Apr-08 0:06 
Generalusing C# to implement Windows Service Pin
George_George3-Apr-08 22:32
George_George3-Apr-08 22:32 
GeneralRe: using C# to implement Windows Service Pin
Giorgi Dalakishvili3-Apr-08 22:34
mentorGiorgi Dalakishvili3-Apr-08 22:34 
GeneralRe: using C# to implement Windows Service Pin
George_George3-Apr-08 23:34
George_George3-Apr-08 23:34 
GeneralRe: using C# to implement Windows Service Pin
N a v a n e e t h3-Apr-08 23:36
N a v a n e e t h3-Apr-08 23:36 
GeneralRe: using C# to implement Windows Service Pin
George_George3-Apr-08 23:55
George_George3-Apr-08 23:55 
GeneralExtending Visual Studio 2005 Pin
Strannick3-Apr-08 22:24
Strannick3-Apr-08 22:24 
GeneralRe: Extending Visual Studio 2005 Pin
Pete O'Hanlon3-Apr-08 23:07
mvePete O'Hanlon3-Apr-08 23:07 
GeneralPersist data in design-time/runtime Pin
LuKas23_3-Apr-08 22:10
LuKas23_3-Apr-08 22:10 
Generalpop client in c#, connect with gmail.com Pin
dift3-Apr-08 21:50
dift3-Apr-08 21:50 

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.