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
M

msomar

@msomar
About
Posts
15
Topics
10
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Connection timeout
    M msomar

    my connection is:

    <add name="AdNetConnectionString" connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=AdNet;Integrated Security=True" providerName="System.Data.SqlClient" />

    the error is Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding and I try to add the proberty

    ConnectionTimeout=200

    to my connection but this error occurred The Connection Timeout attribute is not declared. so please guide me to solve this problem.

    C# help sysadmin security tutorial

  • sql server insert
    M msomar

    ok , my code is:

    sql_Store_Sessions = "insert into AdCampaign (AccountID,AdType,SiteCategory,Language,Gender,Age,Keyword,MaxBudget,DailyBudget,CampaignName,AdHeadline,AdText,DisplayUrl,TargetUrl,BannerImg,ImgName,Date,Status)values(" + Session["SelectIdFromTableAccount"] + ",'" + Session["adType"] + "','" + Session["Category"] + "','" + Session["Language"] + "','" + Session["Gender"] + "','" + Session["Age"] + "',@AdvKeyword," + Session["MaxBudget"] + "," + Session["Daily_Budget"] + ",@CampaignName,@AdHeadLine,@AdText,@DisplayUrl,@DestinationUrl,@Banner_Img,@Img_Name,'" + DateTime.Now + "','Paused')";
    SqlCommand cmd_Store_Sessions = new SqlCommand(sql_Store_Sessions, con);
    cmd_Store_Sessions.Parameters.AddWithValue("CampaignName", Session["CampaignName"]);
    cmd_Store_Sessions.Parameters.AddWithValue("AdHeadLine", Session["AdHeadLine"]);
    cmd_Store_Sessions.Parameters.AddWithValue("AdText", Session["AdText"]);
    cmd_Store_Sessions.Parameters.AddWithValue("DisplayUrl", Session["DisplayUrl"]);
    cmd_Store_Sessions.Parameters.AddWithValue("DestinationUrl", Session["DestinationUrl"]);
    cmd_Store_Sessions.Parameters.AddWithValue("Banner_Img", Session["Banner_Img"]);
    cmd_Store_Sessions.Parameters.AddWithValue("Img_Name", Session["Img_Name"]);

            con.Open();
            cmd\_Store\_Sessions.ExecuteNonQuery();
            con.Close();
    

    but there is an error : The parameterized query '(@AdvKeyword nvarchar(2),@CampaignName nvarchar(2),@AdHeadLine n' expects the parameter '@Banner_Img', which was not supplied

    Database database help sql-server sysadmin

  • sql server insert
    M msomar

    OK,

    protected void Button1_Click(object sender, EventArgs e)
    {
    SqlConnection con = new SqlConnection();
    con.ConnectionString = ConfigurationManager.ConnectionStrings["AdNetConnectionString"].ToString();

            Session\["CampaignName"\]= TexBox1.Text.ToString();
            string sql;
            sql = "insert into AdCampaign (CampaignName)values( ' " + Session\["CampaignName"\] + " ');
            SqlCommand cmd = new SqlCommand(sql, con);
            con.Open();
            cmd.ExecuteNonQuery();
            con.Close();
    }
    
    Database database help sql-server sysadmin

  • sql server insert
    M msomar

    I have a TexBox and it's value stored in a database. but whwe the entered value like ' , ' or ' ; ' there is some error occurred ,so how I can solve this problem.

    Database database help sql-server sysadmin

  • When the code is not separated
    M msomar

    Thanks . But this error is occurred: Parser Error Message: The server block is not well formed.

    ASP.NET database

  • When the code is not separated
    M msomar

    When the code is not separated to index.aspx and index.aspx.vb but all the code aspx and vb in the same page index.aspx where I can but the code such as :

    Imports system.IO

    ASP.NET database

  • Update Error
    M msomar

    When I click button Update this error is cccurred : Exception Details: System.Data.SqlClient.SqlException: Incorrect syntax near 'nvarchar'. my SqlDataSource is:

    the parameter :

    is a session parameter.

    I am waiting please guide me.

    Database help tutorial announcement

  • Select value of DropDawnList Inside GridView
    M msomar

    please see the following url http://tareemnet.com/drop.JPG User Name : adnet Pass : 123 When Editting, the user can change the value using the dropdownlist, and then updating with that new value selected. I'm beginner, please provide me a full code in c# for that issue.

    Database

  • Select value of DropDawnList Inside GridView
    M msomar

    I tried your code . but there is some error : Compiler Error Message: CS0122: 'System.Data.Index' is inaccessible due to its protection level

    Database

  • Select value of DropDawnList Inside GridView
    M msomar

    FormView1.FindControl("TextBox2") as TextBox;

    I need like it to select the value for DrowpDownList inside GridView

    Database

  • Updating related 2 Tables
    M msomar

    I could execute the following sql in SMSS, but when adding it in a sqldatasource as an update statement, it gets an error. In SSMS, and it works fine:

    UPDATE S
    SET S.DailyBudget = 12
    FROM Account O INNER JOIN AdCampaign S
    ON O.ID = S.AccountID
    WHERE O.EmailAddress = 'abc@abc.com'

    But In Sqdatasource, it gets error:

    UPDATE S SET S.DailyBudget = 12 FROM Account O INNER JOIN AdCampaign S ON O.ID = S.AccountID WHERE (O.EmailAddress = @EmailAddress)

    Error: Invalid Object Name 'S'. Hint: S,O are borrowed names, and not actual table names.

    Database database sql-server com help announcement

  • Update query in sql server 2005
    M msomar

    I have select query like this :

    SELECT AdCampaign.CampaignName, AdCampaign.AdType AS [Campaign Type], AdCampaign.Date AS [Start Date], AdCampaign.Clicks, AdCampaign.Impr, AdCampaign.DailyBudget AS [Daily budget] , AdCampaign.Status FROM Account INNER JOIN AdCampaign ON Account.ID = AdCampaign.AccountID WHERE (Account.EmailAddress = @EmailAddress)

    I need like the previous query for update. How I can do it with Join.

    Database database sql-server sysadmin announcement

  • DropDownList inside GridView
    M msomar

    How to get selected item for DropDownList .And this DropDownList is inside GridView.

    C# tutorial

  • How I can pass session parameters to SqlDataSource
    M msomar

    hi.. How I can Pass session parameters to sqlDataSource. I do like this but it is not work:

    <asp:SqlDataSource ID="SqlDataSource1" runat="server"
    ConnectionString="<%$ ConnectionStrings:AdNetConnectionString %>"

            SelectCommand="SELECT CampaignName, AdType AS \[Campaign Type\], Status, Date AS \[Start Date\], Clicks, Impr, DailyBudget AS \[Daily budget\] FROM Account INNER JOIN AdCampaign ON Account.ID = AdCampaign.AccountID WHERE Account.EmailAddress = @EmailAddress  ">
            <SelectParameters>
            <asp:SessionParameter Name="EmailAddress" Type="String"  SessionField="EmailAddress" />
            </SelectParameters>
            </asp:SqlDataSource>
    

    The session name is :session["EmailAddress"] Please guide me.

    Database sysadmin tutorial

  • Select error
    M msomar

    I have this query. but it is not work with the session Please help me.

    SELECT AdCampaign.CampaignName, AdCampaign.AdType AS [Campaign Type], AdCampaign.Status, AdCampaign.Date AS [Start Date], AdCampaign.Clicks, AdCampaign.Impr, AdCampaign.DailyBudget AS [Daily budget] FROM Account INNER JOIN AdCampaign ON Account.ID = AdCampaign.AccountID WHERE (Account.EmailAddress = 'Session["Email_Address"]') AND (Account.Pass = 'Session["Password"]')

    Database help 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