Click here to Skip to main content
16,008,183 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: regex doesn't allow tags Pin
N a v a n e e t h21-Aug-07 23:01
N a v a n e e t h21-Aug-07 23:01 
AnswerRe: regex doesn't allow tags Pin
N a v a n e e t h21-Aug-07 22:58
N a v a n e e t h21-Aug-07 22:58 
QuestionReportss Pin
htonivt21-Aug-07 22:45
htonivt21-Aug-07 22:45 
AnswerRe: Reportss Pin
John-ph22-Aug-07 0:58
John-ph22-Aug-07 0:58 
AnswerRe: gridView binding Pin
cometburn00721-Aug-07 22:45
cometburn00721-Aug-07 22:45 
QuestionDisplaying Extended Details on a GridView Pin
cometburn00721-Aug-07 22:30
cometburn00721-Aug-07 22:30 
AnswerRe: Displaying Extended Details on a GridView Pin
N a v a n e e t h21-Aug-07 23:04
N a v a n e e t h21-Aug-07 23:04 
QuestionGridView problem with DataReader object MySql [modified] Pin
Herman<T>.Instance21-Aug-07 22:28
Herman<T>.Instance21-Aug-07 22:28 
Hi all,

I am trying to fill a GridView with data from a MySql Table.
The gridview is defined in the ASP-file. In the code behind the next code should fill the gridview with data via a Stored Procedure combined with an Array of Parameters.

Codebehind:
    <br />
private void SetGridChooseServices()<br />
    {<br />
        <br />
        MySqlParameter[] arrParameter0 = new MySqlParameter[0];<br />
        String StoredProc = "GetServices";<br />
        gridChooseServices = db.WerkGridViewBij(gridChooseServices, gridChooseServices.PageIndex, StoredProc, arrParameter0);<br />
        PlaatsveldenInGridView();<br />
    }<br />


Method WerkGridViewBij (means updateGridView):
<br />
public GridView WerkGridViewBij(GridView gv, Int32 paginaNummer, String DataSourceSelectCommand, MySqlParameter[] sqlParameters)<br />
    {<br />
        MySqlDataReader reader;<br />
        <br />
        try<br />
        {<br />
            MySqlCommand cmd = BaseDatabaseData(DataSourceSelectCommand, sqlParameters);<br />
            cmd.Connection.Open();<br />
            reader = cmd.ExecuteReader(CommandBehavior.CloseConnection);<br />
            gv.DataSource = reader;<br />
            if (paginaNummer > gv.PageCount) paginaNummer = 0;<br />
            if (gv.AllowPaging)<br />
                gv.PageIndex = paginaNummer;<br />
            gv.DataBind(); // here an error occurs!<br />
            reader.Close();<br />
        }<br />
        catch (Exception err)<br />
        {<br />
            gv.ToolTip = err.Message;<br />
        }<br />
        finally<br />
        {<br />
            if (gv.Rows.Count.Equals(0))<br />
                gv.ToolTip = "Geen data gevonden!";<br />
        }<br />
        return gv;<br />
    }<br />


Method BaseDatabaseData (used in WerkGridViewBij):
<br />
private static MySqlCommand BaseDatabaseData(String StoredProc, MySqlParameter[] arrParameters)<br />
    {<br />
        String connection = System.Configuration.ConfigurationManager.ConnectionStrings[1].ConnectionString;<br />
        MySqlConnection con = new MySqlConnection(connection);<br />
<br />
        MySqlCommand cmd = new MySqlCommand(StoredProc, con);<br />
        cmd.CommandType = CommandType.StoredProcedure;<br />
        cmd.Parameters.AddRange(arrParameters);<br />
<br />
        if (cmd.Connection.State == ConnectionState.Open)<br />
            cmd.Connection.Close();<br />
<br />
        return cmd;<br />
    }<br />


In the method WerkGridViewBij the result from the DB is no records strange enough, while in the database 14 rows are selected. Why do these rows not show up ?


-- modified at 5:12 Wednesday 22nd August, 2007

Error occurs when doing gv.DataBind();
The error says:
{"De gegevensbron biedt geen ondersteuning voor gegevenspaginering op de server."}
The DataSource does not support datapaging on the server.
AnswerRe: GridView problem with DataReader object MySql Pin
Herman<T>.Instance22-Aug-07 0:02
Herman<T>.Instance22-Aug-07 0:02 
QuestionUsing Login &amp; LoginView controls Pin
chathu03j21-Aug-07 22:04
chathu03j21-Aug-07 22:04 
AnswerRe: Using Login &amp; LoginView controls Pin
Big Ralph22-Aug-07 0:51
Big Ralph22-Aug-07 0:51 
GeneralRe: Using Login &amp; LoginView controls Pin
chathu03j22-Aug-07 18:04
chathu03j22-Aug-07 18:04 
GeneralRe: Using Login &amp; LoginView controls Pin
Big Ralph22-Aug-07 20:44
Big Ralph22-Aug-07 20:44 
GeneralRe: Using Login &amp; LoginView controls Pin
chathu03j23-Aug-07 21:37
chathu03j23-Aug-07 21:37 
QuestionFlash Giving that WOW to ur website Pin
duo!@#21-Aug-07 21:59
duo!@#21-Aug-07 21:59 
AnswerRe: Flash Giving that WOW to ur website Pin
SimulationofSai21-Aug-07 22:27
SimulationofSai21-Aug-07 22:27 
QuestionExtracting Numbers From Other Text Pin
Brendan Vogt21-Aug-07 21:42
Brendan Vogt21-Aug-07 21:42 
AnswerRe: Extracting Numbers From Other Text Pin
greekius21-Aug-07 22:26
greekius21-Aug-07 22:26 
QuestionData Grid .. Pin
nandhububbly21-Aug-07 21:42
nandhububbly21-Aug-07 21:42 
AnswerRe: Data Grid .. Pin
Christian Graus21-Aug-07 21:55
protectorChristian Graus21-Aug-07 21:55 
GeneralRe: Data Grid .. Pin
nandhububbly21-Aug-07 22:56
nandhububbly21-Aug-07 22:56 
QuestionAccess to the path 'c:\inetpub\wwwroot\FinalUploadProgress\web.config' is denied. Pin
-- Abhi --21-Aug-07 21:40
-- Abhi --21-Aug-07 21:40 
AnswerRe: Access to the path 'c:\inetpub\wwwroot\FinalUploadProgress\web.config' is denied. Pin
greekius21-Aug-07 22:12
greekius21-Aug-07 22:12 
QuestionSimple connection - What is wrong With This code? Pin
greekius21-Aug-07 21:26
greekius21-Aug-07 21:26 
AnswerRe: Simple connection - What is wrong With This code? Pin
Michael Sync21-Aug-07 21:30
Michael Sync21-Aug-07 21:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.