Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
D

developerit

@developerit
About
Posts
171
Topics
120
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • how to reset the internet explorer settings to default using asp.net with c#
    D developerit

    Dear all, i have to make the internet explorer settings to default in windows 7 in many systems so i need a help is there any way just by entering ip address of the system we can change the internet explorer settings to default

    ASP.NET csharp asp-net help

  • how to display menu control like code project top navigation and left panel menu
    D developerit

    sir iam using asp.net3.5 with c# i want the same menu as code project web site as top navigation as well as left navigation in code project website, can you give me example

    ASP.NET csharp tutorial asp-net

  • how to restrict user to upload only .docx or doc files in document library
    D developerit

    Hi, Iam using sharepoint 2010,in my document library i want to restrict the user to upload the files with extension .docx or doc only , what settings i have to set please can you help.

    SharePoint sharepoint help tutorial

  • how to write work flow in visual studio and use in sharepoint2010
    D developerit

    sir iam new to sharepoint how to write work flow in visual studio and use in sharepoint2010 can you provide me with an example

    SharePoint tutorial csharp sharepoint visual-studio

  • how to start business intelligence in sql server 2008
    D developerit

    sir i have installed the sql server 2008 developer edition on windows xp3 successfully, ,along with reporting services. and i have configure reporting services configuration manager through wizard and completed successfully and the services are running ie sql server reporting services(MSSQLSERVER) state is running. but when i goes from start---> all programs---> microsoft sqlserver2008 iam not getting sql server business intelligence. how to get can you help me please

    Database database sql-server sysadmin business help

  • In infopath2010 how to clear the text box value
    D developerit

    sir iam using infopath2010 , i have designed the form and integrated in sharepoint , it is working fine when user entering the data and clicks on button it is storing but textboxes values are not clearing, how to clear the textbox values or what property i have to set ,can you help me

    SharePoint sharepoint help tutorial

  • how to write work flow in visual studio for list and use in sharepoint
    D developerit

    hi, iam using moss 2007, to validate the list library field of total how to write work flow in visual studio and use in share point can you give example which helps me

    SharePoint tutorial csharp sharepoint visual-studio

  • how to send sms from asp.net
    D developerit

    sir , iam using asp.net with c#. how to send sms from asp.net can you give me example which help me.

    ASP.NET csharp tutorial asp-net help

  • how to execute stored procedure in a function using sql server 2000
    D developerit

    hi iam using sql server 2000 i want to execute stored procedure in a function and the same function i want to call in view. can you give example which helps me

    Database database tutorial sql-server sysadmin

  • how to write the querry at the login with user name given but password is null
    D developerit

    thanks for code project team ...... this logic helps me

    ASP.NET csharp database asp-net sql-server sysadmin

  • how to write the querry at the login with user name given but password is null
    D developerit

    Hi , iam using asp.net2.0 with c# with backend sql server 2000. in my database some user dosent have password (null) and some user having password .when iam checking the user it is giving message invalid user or password. can you correct my querry which helps me

    SqlCommand cmd = new SqlCommand("select * from Usersprogrammer where UserName='" + txtusername.Text + "' and OrPassword='"+txtpassword.Text+"'", con);

    ASP.NET csharp database asp-net sql-server sysadmin

  • images are not uploading in windows7 and vista using asp.net with c#
    D developerit

    hi , iam using asp.net 2.0 with sql server 2000 in my site if iam using xp operating system all clients are able to upload the pictures but the clients those who are using windows7 and vista the are getting errors can you correct my code

    <%@ WebHandler Language="C#" Class="right7" %>

    using System;
    using System.IO;
    using System.Data;
    using System.Data.SqlClient;
    using System.Configuration;

    using System.Web;
    public class right7 : IHttpHandler {

    public void ProcessRequest (HttpContext context) 
    {
        string branchid = "";
    
        //if(context.Session\["branchid"\]!=null)
        if (context.Request.QueryString\["branchid"\] != null)
    
    
            branchid = context.Request.QueryString\["branchid"\];
        else
            throw new ArgumentException("No parameter specified");
    
        context.Response.ContentType = "image/jpeg";
        Stream strm = ShowImage(branchid);
        byte\[\] buffer = new byte\[4096\];
        int byteSeq = strm.Read(buffer, 0, 4096);
    
        while (byteSeq > 0)
        {
            context.Response.OutputStream.Write(buffer, 0, byteSeq);
            byteSeq = strm.Read(buffer, 0, 4096);
        }
        //context.Response.BinaryWrite(buffer)  
    }
    public Stream ShowImage(string branchid)
    {
        SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings\["transfer"\].ConnectionString);
        string sql = "SELECT imgright7 FROM tblImages WHERE BranchId = @BranchId";
        SqlCommand cmd = new SqlCommand(sql, con);
        cmd.CommandType = CommandType.Text;
        cmd.Parameters.AddWithValue("@BranchId", branchid);
        con.Open();
        object img = cmd.ExecuteScalar();
    
        try
        {
            return new MemoryStream((byte\[\])img);
        }
        catch
        {
            return null;
        }
        finally
        {
            con.Close();
        }
    }
    
    public bool IsReusable {
        get {
            return false;
        }
    }
    

    }

    using System.Data;
    using System.Data.SqlClient;

    using System.Configuration;
    using System.Collections;
    using System.Web;
    using System.Web.Security;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Web.UI.WebControls.WebParts;
    using System.Web.UI.HtmlControls;

    public partial class right7image : System.Web.UI.Page
    {
    SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["transfer"].ConnectionString);

    string branchid =
    
    ASP.NET csharp asp-net database sql-server design

  • procedure returning no data even though data is present in database
    D developerit

    hi, my client is also having same database with same tables, client is having data also but displaying no data as a result

    ASP.NET csharp database asp-net

  • how to handle users at the same time to get different primarkey value
    D developerit

    thanks for code project team .... this logic helps me

    ASP.NET csharp asp-net tutorial

  • procedure returning no data even though data is present in database
    D developerit

    hi, iam using asp.net2.0 with c#, with backend sql server2000 in my client system i have to create dynamically procedure and return the result but when iam using in my local system the code is working fine but at client system it it not working can you correct my code which helps me

    string strcon = "Data Source=";strcon += Request.Params["REMOTE_ADDR"] + ";" + "Initial Catalog=POS;User ID=sa;Password=xx103";

    SqlConnection conproc = new SqlConnection(strcon);
    conproc.Open();
    SqlCommand cmdproc = new SqlCommand("getsum", conproc);
    cmdproc.CommandType = CommandType.StoredProcedure;

        cmdproc.Parameters.AddWithValue("@BranchKey", Convert.ToInt32(Session\["BranchKey"\]));
        DateTime dt = Convert.ToDateTime(txtfrom.Text.ToString());
        string fromDate = dt.ToShortDateString();
        DateTime dt1 = Convert.ToDateTime(txtto.Text.ToString());
        string toDate = dt1.ToShortDateString();
    
    
        cmdproc.Parameters.AddWithValue("@FromDate", SqlDbType.SmallDateTime).Value = fromDate;
        cmdproc.Parameters.AddWithValue("@ToDate", SqlDbType.SmallDateTime).Value=toDate;
    
        SqlParameter p1 = cmdproc.Parameters.Add("@tot", SqlDbType.Decimal);
        p1.Direction = ParameterDirection.Output;
        if ((Convert.ToInt32(cmdproc.ExecuteNonQuery())!= -1) && (cmdproc.Parameters\["@tot"\].Value)!= DBNull.Value)
        {
            decimal ot = Convert.ToDecimal(cmdproc.Parameters\["@tot"\].Value);
            //decimal ot = Convert.ToDecimal(p1.Value);
            if (ot != null)
            {
                txttotal.Text = ot.ToString();
                conproc.Close();
            }
        }
        else
        {
    
    
            clsdataset.ShowAlertMessage("No Data");
            txttotal.Text = "";
    
        }
    
    ASP.NET csharp database asp-net

  • how to handle users at the same time to get different primarkey value
    D developerit

    hi iam using asp.net2.o with c# in my application when user logins iam storing information in ordders table OrderNo int primary key (auto increment) email varchar(50) and redirects to the orders page.and in this page he will retreive the newly primary key generated and stores in session as orders. but at the same time another user logins then he is also getting the same orderno . how to handle this situation.. can you correct my code which helps me

    protected void Button1_Click(object sender, EventArgs e)
    {
    //add

        int x = 0;
       
    
        foreach (GridViewRow row in GridView1.Rows)
        {
    
    
             CheckBox c1 = (CheckBox)row.FindControl("chk");
            TextBox qt = (TextBox)row.FindControl("txtQuantity");
            TextBox tot1 = (TextBox)row.FindControl("txtTotal");
    
            Label categoryname = (Label)row.FindControl("Label1");
            Label ItemKey = (Label)row.FindControl("Label2");
            Label ItemKeyNameE = (Label)row.FindControl("Label3");
            Label CurrentQTY = (Label)row.FindControl("Label4");
            Label SalesPrice = (Label)row.FindControl("Label5");
            //=====================================================
    
    
    
            if (c1.Checked == true)
            {
               
                int chempty = 0;
    
                SqlCommand getpk = new SqlCommand("select IDENT\_CURRENT('TblOrder')", con);
                getpk.CommandTimeout = 0;
                con.Open();
                x = Convert.ToInt32(getpk.ExecuteScalar());
                Session\["order"\] = x;
                con.Close();
                //add to temp
                SqlCommand cmdtemp = new SqlCommand("Addtemp", con);
                cmdtemp.CommandType = CommandType.StoredProcedure;
                con.Open();
                cmdtemp.Parameters.AddWithValue("@OrderNo", Convert.ToInt32(x));
                cmdtemp.Parameters.AddWithValue("@CategoryNameE", categoryname.Text);
                cmdtemp.Parameters.AddWithValue("@ItemKey", ItemKey.Text);
    
                cmdtemp.Parameters.AddWithValue("@ItemKeyNameE", ItemKeyNameE.Text);
                cmdtemp.Parameters.AddWithValue("@CurrentQTY", CurrentQTY.Text);
                cmdtemp.Parameters.AddWithValue("@SalesPrice", SalesPrice.Text);
                cmdtemp.Parameters.AddWithValue("@Quantity", qt.Text);
                cmdtemp.Parameters.AddWithValue("@total", tot1.Text);
                chempty = Convert.ToInt
    
    ASP.NET csharp asp-net tutorial

  • how to check the procedure is already exists in database
    D developerit

    hi iam using asp.net with c# i want to check through coding is procedure already exists in database or not can you give example which helps me

    ASP.NET csharp tutorial asp-net database

  • returning null value from procedure
    D developerit

    hi iam using asp.net2.0 with c# with sql server 2000 when iam executing the procedure in local system it is working fine.but when iam executing in client system procedure returns null value, i have checked all connection string , and session value all are working can you correct the code which helps me

        SqlConnection concreate = new SqlConnection(strcon);
    
        string pp = "";
        pp = "create procedure getsum( @BranchKey int,@FromDate smalldatetime,@ToDate smalldatetime, @tot decimal output )";
        pp += "as";
        pp += "\\n";
        pp += "set @tot=(SELECT  SUM(Amount) FROM   AllTransactions WHERE BranchKey=@BranchKey  and  (TransCode <> 0) and (TransDate > @FromDate) and (TransDate < @ToDate)  GROUP by  BranchKey)";
        pp += "return @tot";
        pp += ";";
    
        
        SqlCommand cmdcreate = new SqlCommand(pp, concreate);
        concreate.Open();
        cmdcreate.ExecuteNonQuery();
        concreate.Close();
    
        SqlConnection conproc = new SqlConnection(strcon);
        conproc.Open();
        SqlCommand cmdproc = new SqlCommand("getsum", conproc);
        cmdproc.CommandType = CommandType.StoredProcedure;
    
    
        cmdproc.Parameters.AddWithValue("@BranchKey", Convert.ToInt32(Session\["BranchKey"\]));
        DateTime dt = Convert.ToDateTime(txtfrom.Text.ToString());
        string fromDate = dt.ToShortDateString();
        DateTime dt1 = Convert.ToDateTime(txtto.Text.ToString());
        string toDate = dt1.ToShortDateString();
        cmdproc.Parameters.AddWithValue("@FromDate", fromDate);
        cmdproc.Parameters.AddWithValue("@ToDate", toDate);
    
        SqlParameter p1 = cmdproc.Parameters.Add("@tot", SqlDbType.Decimal);
        p1.Direction = ParameterDirection.Output;
        if ((cmdproc.ExecuteScalar() != DBNull.Value) && (cmdproc.Parameters\["@tot"\].Value) != DBNull.Value)
        {
            decimal ot = Convert.ToDecimal(cmdproc.Parameters\["@tot"\].Value);
            if (ot != null)
            {
                txttotal.Text = ot.ToString();
                conproc.Close();
            }
        }
        else
        {
    
    
            clsdataset.ShowAlertMessage("No Data");
    
        }
    
    ASP.NET csharp asp-net database sql-server sysadmin

  • getting value zero when caculating value between dates in ado.net using asp.net with c#
    D developerit

    hi, i have done debugging very carefully and copy and paste the querry in sql analyzer but in sql it is returning data . and in asp.net it is returning zero.

    ASP.NET csharp asp-net database

  • getting value zero when caculating value between dates in ado.net using asp.net with c#
    D developerit

    i have check this post also but the result iam getting the same zero. i have checked the connection string,session value every thing is fine i have run the same querry in sql analyzer also it is working fine and result is displayed but in asp.net it is returning zero can give suggestion what to do next

    ASP.NET csharp asp-net database
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups