User Profile

Collapse

Profile Sidebar

Collapse
hemantc87
hemantc87
Last Activity: Apr 9 '10, 06:27 AM
Joined: Mar 2 '10
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • passing parameters using stored procedure with where clause??

    i have created this function with a parameter offset and i want to access the database using stored procedure but the code and stored procedure i have written below is not working...what is the right way to do it??

    Code:
    public bool isoffsetexist(int offset)
        {
            conn.Open();
         
            SqlCommand cmd = new SqlCommand();
            cmd.Connection = conn;
            cmd.CommandType =
    ...
    See more | Go to post

  • passing parameters using stored procedure with where clause??

    i have created this function with a parameter offset and i want to access the database using stored procedure but the code and stored procedure i have written below is not working...what is the right way to do it??

    Code:
    public bool isoffsetexist(int offset)
        {
            conn.Open();
         
            SqlCommand cmd = new SqlCommand();
            cmd.Connection = conn;
            cmd.CommandType = CommandType.StoredProcedure;
    ...
    See more | Go to post

  • the comments were put there by mistake...dont consider them in the code
    thnku frinavale but i still havent got the exact method how to achieve it??
    See more | Go to post

    Leave a comment:


  • hemantc87
    started a topic update gridview with stored procedure??

    update gridview with stored procedure??

    i am using this stored procedure to update my gridview
    Code:
    CREATE PROCEDURE [dbo].[updatestdnt]
    @Name varchar(20),
    @Course varchar(20),
    @Age numeric,
    @Sex varchar(20),
    @DateofBirth datetime,
    @Address  varchar(20),
    @Contactno numeric,
    @Email varchar(20),
    @studentid varchar(10),
    @password varchar(10)
    AS
    UPDATE Student SET
    Name=@Name ,
    Course=@Course,
    ...
    See more | Go to post

  • passing parameters with help of stored procedure??

    i created a function give below and passed a parameter to it.i used a simple query to access the database..is there any way to do it with a stored procedure with parameters instead of a simple query as stored procedure is a better method

    Code:
    public bool isoffsetexist(int offset)
        {
            conn.Open();
    
            SqlCommand cmd = new SqlCommand("select * from tb_offset where offset= " + offset
    ...
    See more | Go to post

  • passing parameters with help of stored procedure??

    i created a function give below and passed a parameter to it.i used a simple query to access the database..is there any way to do it with a stored procedure with parameters instead of a simple query as stored procedure is a better method

    Code:
    public bool isoffsetexist(int offset)
        {
            conn.Open();
    
            SqlCommand cmd = new SqlCommand("select * from tb_offset where offset= " + offset
    ...
    See more | Go to post

  • hemantc87
    started a topic setting a offset value for a particular id??

    setting a offset value for a particular id??

    i am designing a website in which i need to generate an offset value for a product(and store it in database) between 1 to 999 for every product id i store into my database from a textbox..but first it must check if a particular value starting from 1 to 999 is already taken if yes then it generates the next available number between 1 to 999..the problem is how can i retrieve and check the available numbers already stored in offset column of my ...
    See more | Go to post

  • the primary key issue was solved and thank you for telling me about sql injection attack..Your articles on it were really helpful..i just wanted to know that the method i used now was correct or not??
    Code:
    SqlCommand cmb = new SqlCommand();
                cmb.Connection = conn;
                cmb.CommandType = CommandType.Text;
                cmb.CommandText="update Student set Name='" + name.Text + "',Course='"
    ...
    See more | Go to post

    Leave a comment:


  • hemantc87
    started a topic what query to fire in Row updating event?

    what query to fire in Row updating event?

    Code:
    protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e)
            {
                conn.Open();
                int idx = e.RowIndex;
                GridViewRow row1 = GridView1.Rows[idx];
              //  string s = row1.Cells[0].Text;
                TextBox name = (TextBox)row1.Cells[1].Controls[0];
                TextBox course = (TextBox)row1.Cells[2].Controls[0];
                TextBox age
    ...
    See more | Go to post

  • hemantc87
    started a topic Generic class implementation??

    Generic class implementation??

    i want to implement a sort function using a generic class.But when i declare the type generic parameter T it is not able to take the input from user.what should i do?

    Code:
     static void Sort<T>(ref T[] a)
            {
                
                T[] x;
               Console.Write("how many numbers u want to sort:);
                T q = Convert.ToInt32(Console.ReadLine());
    
                Console.WriteLine("enter
    ...
    See more | Go to post
    Last edited by tlhintoq; Mar 13 '10, 06:07 AM. Reason: [CODE] ...Your code goes between code tags [/CODE]

  • hemantc87
    started a topic Do template classes exist in C#?

    Do template classes exist in C#?

    Do template classes exist in c#? I googled it but couldn't find anything relevant. I have been asked to make a project using template classes Can i get any link or info regarding what template classes are?
    See more | Go to post

  • hemantc87
    started a topic interface implementation??

    interface implementation??

    Code:
    class Program
        {
            interface math
            {
                void one();
                void two();
            }
            class test : math
            {
                void math.one()
                {
                   
                }
                void math.two()
                {
                    
                }
                
             public void
    ...
    See more | Go to post

  • pass a string from one function to another in a console application??

    i am creating a menu driven application which goes like this
    1. Add an new employee
    2. Show employee
    3. Edit employee
    4. Delete Employee
    after i am able to add an employee through a function add() i m not able to display the value in 2nd option which has a function show.i am new to it and as far as i can say the variable looses its scope outside add function and nothing shows up in show(). What should i do??
    See more | Go to post
No activity results to display
Show More
Working...