c# - SQL statement fails -


i use statement:

  select threadsid     threads  order threadsid desc 

why sql statement fail return i'd expect? reason, puts 1 record id = 32 between id = 52 , id = 53:

threadid --------- ... 53 32  -- <-- huh?! 52 

connection string:

    <add name="modelconnectionstring" connectionstring="data source=.\sqlexpress;attachdbfilename='d:\documents , settings\dima\my documents\visual studio 2010\websites\website10\app_data\aspnetdb.mdf';integrated security=true;user instance=true;trusted_connection=yes;"   providername="system.data.sqlclient" / 

i have got additional info effects list:

    stringbuilder sb = new stringbuilder();     sb.append("select u.name,t.threadtitle,t.date, t.views,t.replies,p.theme,p.topics,t.pagenumber, t.threadsid");     sb.append("  threads t");     sb.append( " inner join users u on u.usersid=t.usersid");     sb.append( " inner join topics p on p.topicsid=t.topicsid");     sb.append(" t.threadsid=@threadsid"); 

the @threadsid..goes second query...but doesnt effect order of things.. after both of seperate sql commands executed weird result

it because id not number type. kind of data threadid on table?


Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

c# - SharpSVN - How to get the previous revision? -

php cli reading files and how to fix it? -