My name is Devkranth .. i need help in sql.... i have 3 tables to retrieve data and display it.. there is no Primary key in any table.. but there is a common column , so if i join the tables i am getting rows duplicated... plz help me..
Although you don't have to call Close() it is advisable. While the DataReader is open you are tying up the connection so it cannot be used until the reader has been collected by the garbage collector. You don't have any control over when the garbage collector will collect the reader.
Another option is to wrap it in a using statment and have C# close it when it drops out of scope
using(SqlDataReader dr = cmd.ExecuteReader())
// Do stuff.
I am doing a project in Visual Studio .net (language C#). How can I store documents (like Word, Excel, PPT etc.) in an SQL server 2000.
Please can anybody provide some useful links or the exact method/code.
Yes Sure you can do that. All what you need to do is add parameters to your insert statment.
insert into temptable (col1,col2) values (@username,@date)
the @username and @date are the parameters you have to assign values to in you command object.
mycommand.parameters.add("@username","Value of the username")
mycommand.parameters.add("@date","Value of the date")
there is a new ctrlkey on every 6 rollnos
I want Output Should like this :
Rollno Marks (like Foreign Key)
Please help me to write a single select query to get output.