[Problem] VB.NET with datatables

[Problem] VB.NET with datatables

n1c0t0pn1c0t0p Posts: 3Questions: 0Answers: 0
edited July 2014 in Free community support

Hello to everyone!

I am using a template from themeforest.com, and have your plugin.

the theme is Avant.

in your datatables, i need to use the data from SQL and input with the vb.net

and this is the result:

http://imgur.com/nY6oM8O

The datatable doest count the rows of information i have. Can anyone explain to me this problem?

Code:

<

div class="tab-container tab-success">

    <div class="container tab-pane" id="apolice">
        <div class="row">
          <div class="col-md-12">
                    <div class="table-responsive collapse in panel panel-sky">
                        <br />
                        <table cellpadding="0" cellspacing="0" border="0" class="table table-striped table-bordered datatables" id="example">
                                                      <thead>
                                                        <tr>
                                                            <th>Data de Inicio</th>
                                                            <th>Data Termo</th>
                                                            <th>Número de Apólice</th>
                                                            <th>Tipo</th>
                                                            <th>Seguradora</th>
                                                            <th>Ramo</th>
                                                            <th>Risco</th>
                                                            <th>Prémio</th>
                                                        </tr>
                                                    </thead>
                             <%
                                  If SQL.Connect Then
                                      Cmd = New SqlCommand("SELECT * FROM vwClientes_Apolices_Completo WHERE contacto_id=" & contacto_id.ToString & " ORDER BY data_inicio", CDSI.SQLServer)
                                      Rs = Cmd.ExecuteReader()

                                      If Rs.HasRows Then
                                          While Rs.Read()
                                              If Not IsDBNull(Rs.Item("apolice_id")) Then
                                                  Me.FXdata_inicio.Text = String.Format("{0:yyyy/MM/dd}", Rs.Item("data_inicio"))
                                                  Me.FXdata_termo.Text = String.Format("{0:yyyy/MM/dd}", Rs.Item("data_termo"))
                                                  Me.FXnum_apolice.Text = Rs.Item("apolice_no").ToString
                                                  Me.FXtipo.Text = Rs.Item("tipo").ToString
                                                  Me.FXseguradora.Text = Rs.Item("seguradora").ToString
                                                  Me.FXramo.Text = Rs.Item("ramo").ToString
                                                  Me.FXrisco.Text = Rs.Item("risco").ToString
                                                  Me.FXpremio.Text = String.Format("{0:0,0.00€}", Rs.Item("premio_total"))


                                                                %> 

                                                    <tbody>
                                                        <tr>
                                                            <td><asp:Label ID="FXdata_inicio" runat="server" Text=""></asp:Label></td>
                                                            <td><asp:Label ID="FXdata_termo" runat="server" Text=""></asp:Label></td>
                                                            <td><asp:Label ID="FXnum_apolice" runat="server" Text=""></asp:Label></td>                                                              
                                                            <td><asp:Label ID="FXtipo" runat="server" Text=""></asp:Label></td>
                                                            <td><asp:Label ID="FXseguradora" runat="server" Text=""></asp:Label></td>
                                                            <td><asp:Label ID="FXramo" runat="server" Text=""></asp:Label></td>
                                                            <td><asp:Label ID="FXrisco" runat="server" Text=""></asp:Label></td>
                                                            <td><asp:Label ID="FXpremio" runat="server" Text=""></asp:Label></td>
                                                        </tr>
                                                                            <%
                                              End If
                                          End While
                                      End If
                                  End If

                                  If Not Rs.IsClosed Then Rs.Close()
                                                                                    %>


                                                    </tbody>
                                                </table>
                                                      </div>
                                            </div>
                                        </div>

Best Regards,

Pedro Cruz

Replies

This discussion has been closed.