password or username incorrect or access level
foryou
Posts
-
How to open in local existing site created by joomla? -
How to open in local existing site created by joomla?Thank you Marc Firth I followed your advice and it works but I have a problem I can not log to Administrator. I used the password they gave me it is the same that the password in table jos_users.
-
How to open in local existing site created by joomla?hello! It gave me a site created by joomla to make the change and administer, but I do not how. The problem is that all of joomla tutorials are explain how to create a site from zero: how does it work on an existing site ? thank you for your help.
-
select where onlyThanks scottgp it works.:)
-
select where onlyHi! I have a table Validation: Id_student --- - id_semestre ----- id_validation 102----------- - 1 ---------------- 4 102----------- - 1 ---------------- 3 -- 102----------- - 2 ---------------- 4 103----------- - 1 ---------------- 4 104----------- - 2 ---------------- 3 104----------- - 2 ---------------- 4 I want to select students who have in semestre 2 id_validation = 4 only . in the example i want have : 102 students, not 102 and 104 thank you.
-
An SQL StatisticsThanks Mycroft Holmes; Groupby gives me no count of student in any city
WITH r1
AS (SELECT CAPITALISE_SEMESTRE_1.NUM_INSCRIPTION,
CAPITALISE_SEMESTRE_1.CODE_SEMESTRE , CAPITALISE_SEMESTRE_1.CODE_TYPE_RELATION_SEMESTRE ,CAPITALISE_SEMESTRE_1.ann_uniFROM CAPITALISE\_SEMESTRE AS CAPITALISE\_SEMESTRE\_1 WHERE (CAPITALISE\_SEMESTRE\_1.CODE\_TYPE\_RELATION\_SEMESTRE = 4) AND (CAPITALISE\_SEMESTRE\_1.CODE\_SEMESTRE = 2)),
r2 AS
(SELECT CAPITALISE_SEMESTRE.NUM_INSCRIPTION AS Expr1, CAPITALISE_SEMESTRE.CODE_SEMESTRE AS Expr2,
CAPITALISE_SEMESTRE.ann_uni AS Expr4
FROM CAPITALISE_SEMESTRE AS CAPITALISE_SEMESTREWHERE (CAPITALISE\_SEMESTRE.ann\_uni = '2008/2009') AND (CAPITALISE\_SEMESTRE.CODE\_SEMESTRE = 1)) SELECT r1\_1.NUM\_INSCRIPTION FROM r1 AS r1\_1 INNER JOIN r2 AS r2\_1 ON r1\_1.NUM\_INSCRIPTION = r2\_1.Expr1
-
An SQL StatisticsHi! I work on an intranet site of a university(sqlserver2005) and I need to do statistics for example I need to count the students new in the semester 2 for each city: Here is the SQL query that selects the new students in semester 2:
WITH r1 AS (SELECT CAPITALISE_SEMESTRE_1.NUM_INSCRIPTION, CAPITALISE_SEMESTRE_1.CODE_SEMESTRE , CAPITALISE_SEMESTRE_1.ann_uni, SEMESTRE_1.LIBELLE_SEMESTRE_AR,
TYPE_RELATION_SEMESTRE_1.LIBELLE_TYPE_RELATION_SEMESTRE
FROM CAPITALISE_SEMESTRE AS CAPITALISE_SEMESTRE_1 INNER JOIN
SEMESTRE AS SEMESTRE_1 ON CAPITALISE_SEMESTRE_1.CODE_SEMESTRE = SEMESTRE_1.CODE_SEMESTRE INNER JOIN
TYPE_RELATION_SEMESTRE AS TYPE_RELATION_SEMESTRE_1 ON
CAPITALISE_SEMESTRE_1.CODE_TYPE_RELATION_SEMESTRE = TYPE_RELATION_SEMESTRE_1.CODE_TYPE_RELATION_SEMESTRE
WHERE (CAPITALISE_SEMESTRE_1.CODE_TYPE_RELATION_SEMESTRE = 4) AND (CAPITALISE_SEMESTRE_1.CODE_SEMESTRE = 2)),
r2 AS
(SELECT CAPITALISE_SEMESTRE.NUM_INSCRIPTION AS Expr1, CAPITALISE_SEMESTRE.CODE_SEMESTRE AS Expr2,
SEMESTRE.LIBELLE_SEMESTRE_AR AS Expr3,CAPITALISE_SEMESTRE.ann_uni AS Expr4
FROM CAPITALISE_SEMESTRE AS CAPITALISE_SEMESTRE INNER JOIN
SEMESTRE AS SEMESTRE ON CAPITALISE_SEMESTRE.CODE_SEMESTRE = SEMESTRE.CODE_SEMESTRE INNER JOIN
TYPE_RELATION_SEMESTRE AS TYPE_RELATION_SEMESTRE ON
CAPITALISE_SEMESTRE.CODE_TYPE_RELATION_SEMESTRE = TYPE_RELATION_SEMESTRE.CODE_TYPE_RELATION_SEMESTRE
WHERE (CAPITALISE_SEMESTRE.ann_uni = @ann_uni) AND (CAPITALISE_SEMESTRE.CODE_SEMESTRE = 1))
SELECT r1_1.NUM_INSCRIPTION, r1_1.ann_uni,r1_1.CODE_SEMESTRE, r1_1.LIBELLE_SEMESTRE_AR, r1_1.LIBELLE_TYPE_RELATION_SEMESTRE, r2_1.Expr1,
r2_1.Expr2, r2_1.Expr3, r2_1.Expr4
FROM r1 AS r1_1 INNER JOIN
r2 AS r2_1 ON r1_1.NUM_INSCRIPTION = r2_1.Expr1but I do not know how to calculate the number for each city: Number of sudent new in semester2------------City 12222---------------------------------city1 123----------------------------------city2 Thanks.
-
The object must implement IConvertibleThank you very much Blue_Boy it works
-
The object must implement IConvertibleHi!! I have this error message: "The object must implement IConvertible." in this line myAdapter.Fill(ds, "Table1"); my code is:
private void BindData() { try { SqlConnection myConnection = new SqlConnection(ConnectionString); SqlCommand myCommand = new SqlCommand("SP_S1", myConnection); myCommand.Parameters.Add("@ch1", SqlDbType.VarChar, 30).Value = DropDownList1.SelectedItem; myCommand.CommandType = CommandType.StoredProcedure; SqlDataAdapter myAdapter = new SqlDataAdapter(myCommand); DataSet ds = new DataSet(); myAdapter.Fill(ds, "Table1"); myConnection.Open(); myCommand.ExecuteNonQuery(); GridView1.DataSource = ds; GridView1.DataBind(); myConnection.Close(); } catch (Exception) { } }
someone could help me? Thanks. -
get gridview row values on rowcommand eventHi! I have a gridview with TemplateField column i need to get gridview row values on rowcommand event ,to update a gridview row how? im writing GridViewRow rf =GridView1.Rows(e.CommandArgument); n1 = rf.Cells[0].Text ; but it doesn't work!! Thanks
-
Update a gridview row without editThank you yusuf! I'm sorry I speak badly English. in place of the method edit update cancel I want : having a button for each row of the GridView and if I click on this button I will update the line.
-
Update a gridview row without editHi! I work with C # I want update my columns in my GridView without going through edit : for each row I click update button to update the line how? Thank you.
-
value of a cell of selected rowThank you Greg Chelstowski; I tried your code and there:
protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
{
GridViewRow row = GridView1.Rows[GridView1.SelectedIndex];
string strValCell = row.Cells[2].Text;
}//and
public void GridView1_SelectedIndexChanged(Object sender, EventArgs e)
{TextBox1.Text = GridView1.SelectedRow.Cells\[2\].Text; }
but it doesn't work " any result" and if i do
public void GridView2_SelectedIndexChanged(Object sender, EventArgs e)
{
TextBox tb = GridView1.SelectedRow.FindControl("id0") as TextBox;
if (tb != null)TextBox1.Text = tb.Text; else TextBox1.Text = "no data"; }
I have always "no data"
-
value of a cell of selected rowHi. For a GridView, how to retrieve the cell values of a selected row? Thank you!
-
GridView and SelectedIndexChangedThank you Satish Mahapatra and Greg Chelstowski. I tried your solution but it does not work:( I want to have: the value of a cell of selected line in a GridView. I read that i can do that :TextBox1.Text = GridView2.SelectedRow.Cells[1].Text; but it doesn't work.
-
GridView and SelectedIndexChangedHi!!
public void GridView2_SelectedIndexChanged(Object sender, EventArgs e) { TextBox tb = GridView2.SelectedRow.FindControl("id0") as TextBox; if (tb != null) TextBox1.Text = tb.Text; else TextBox1.Text = "no data"; //TextBox1.Text = GridView2.SelectedRow.Cells[1].Text; }
This code returns me always "no data" even if there is data in the GridView. I do not see where is the error. thanks -
populate GridView with stored procedureThank you Satish Mahapatra it works I forgot a field in my stored procedure.
-
populate GridView with stored procedureI have no erreur no message erreur if i click sur the button I havent result. my code c#:
using System; using System.Data; 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; using System.Data.SqlClient; private void Page_Load(object sender, System.EventArgs e) { } public void BindData() { SqlConnection myConnection = new SqlConnection(ConnectionString); SqlCommand myCommand = new SqlCommand("PS_NV2", myConnection); myCommand.CommandType = CommandType.StoredProcedure; SqlDataAdapter myAdapter = new SqlDataAdapter(myCommand); DataSet ds = new DataSet(); myAdapter.Fill(ds, "table"); myConnection.Open(); myCommand.ExecuteNonQuery(); GridView2.DataSource = ds; try { GridView2.DataBind(); } catch { GridView2.PageIndex = 0; GridView2.DataBind(); } myConnection.Close(); } private string ConnectionString { get { string connectionString = (@"Data Source=.\SQLEXPRESS;UID=sa;Password=**3*;Initial Catalog=mybd"); return connectionString; } } protected void GridView2_SelectedIndexChanging(object sender, GridViewSelectEventArgs e) { Response.Write(e.NewSelectedIndex); } protected void GridView2_SelectedIndexChanged(object sender, EventArgs e) { GridViewRow row = GridView2.SelectedRow; TextBox4.Text = row.Cells[2].Text; } protected void GridView2_RowEditing(object sender, GridViewEditEventArgs e) { GridView2.EditIndex = e.NewEditIndex; BindData(); } protected void GridView2_RowCancelingEdit(object sender, GridViewCancelEditEventArgs e) { GridView2.EditIndex = -1; BindData(); } protected void Button1_Click1(object sender, EventArgs e) { BindData(); GridView2.Visible = true; } }
DataKeyNames="c1" OnRowCancelingEdit="GridView2_RowCancelingEdit" OnRowEditing="GridView2_RowEditing" OnSelectedIndexChanged="GridView2_SelectedIndexChan
-
populate GridView with stored procedureThank you Satish Mahapatra. it doesn't works :( this code works fine for a datagrid but not for the GridView I do not know if the error can come from here for datagrid i have DataGrid1.CurrentPageIndex = 0; I have replaced by : GridView2.PageIndex =0 ; thanks.
-
populate GridView with stored procedureHI! I do not know how to populate my GridView with stored procedure I have this code but it doesn't works she returned result or error message
public void BindData()
{
SqlConnection myConnection = new SqlConnection(ConnectionString);SqlCommand myCommand = new SqlCommand("PS\_NV2", myConnection); myCommand.CommandType = CommandType.StoredProcedure; SqlDataAdapter myAdapter = new SqlDataAdapter(myCommand); DataSet ds = new DataSet(); myAdapter.Fill(ds, "TAble"); myConnection.Open(); myCommand.ExecuteNonQuery(); GridView2.DataSource = ds; try { GridView2.DataBind(); } catch { GridView2.PageIndex = -1; GridView2.DataBind(); } myConnection.Close();
correct me please.Thanks