اذهب إلى المحتوى
  • 1

ماهو الخطاء في عرض البيانات في الجدول من قاعدة البيانت

كمال صالح2

السؤال



<!DOCTYPE html>
<html>
<head>
    <link rel="icon" href="https://c0.klipartz.com/pngpicture/573/614/gratis-png-ng%C5%A9-hanh-s%C6%A1n-distrito-casa-apartamento-inmobiliaria-volta-redonda-venta-de-logotipos-de-bienes-raices.png" />
    <title>موقع الاملاك</title>
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Tajawal:wght@300&display=swap" rel="stylesheet">
    <meta charset="utf-8" />
    <link rel="stylesheet" type="text/css" media="screen" href="home.css">
</head>
<body>
    <header>
        <div>
            <img src="a.png" alt="نظام الإملاك من كمال تجريبي">
        </div>
        <center>
            <div>
                <button>نقاط البيع</button>
                <button>أدارة المخزون</button>
                <button>الإراضي</button>
                <button>الشيكات</button>
                <button>الأستاذ العام</button>
                <button>إدارة النظام</button>
            </div>
        </center>
    </header>
    <asp:Repeater id="Problemss" runat="server">

        <HeaderTemplate>
            <table border="1" width="100%">
                <tr>
                    <th>تم</th>
                    <th>الحلول</th>
                    <th>المشكله</th>
                    <th>م</th>
                    <th>الرقم</th>
                </tr>
        </HeaderTemplate>

        <ItemTemplate>
            <tr>
                <td><%#Container.DataItem("تم")%></td>
                <td><%#Container.DataItem("الحلول")%></td>
                <td><%#Container.DataItem("المشكله")%></td>
                <td><%#Container.DataItem("م")%></td>
                <td><%#Container.DataItem("الرقم")%></td>
            </tr>
        </ItemTemplate>

        <FooterTemplate>
            </table>
        </FooterTemplate>

    </asp:Repeater>


</body>
</html>

 

رابط هذا التعليق
شارك على الشبكات الإجتماعية

Recommended Posts

  • 1

الخطأ هو انك لم تعطي الكود مصدر البيانات عليك استخدام خاصية DataSource كالتاللي :- 
 

<asp:Repeater id="Problemss" runat="server" DataSource="<%= SqlDataSource1.Select() %>">

        <HeaderTemplate>
            <table border="1" width="100%">
                <tr>
                    <th>تم</th>
                    <th>الحلول</th>
                    <th>المشكله</th>
                    <th>م</th>
                    <th>الرقم</th>
                </tr>
        </HeaderTemplate>

        <ItemTemplate>
            <tr>
                <td><%#DataItem("تم")%></td>
                <td><%#DataItem("الحلول")%></td>
                <td><%#DataItem("المشكله")%></td>
                <td><%#DataItem("م")%></td>
                <td><%#DataItem("الرقم")%></td>
            </tr>
        </ItemTemplate>

        <FooterTemplate>
            </table>
        </FooterTemplate>

    </asp:Repeater>

 

رابط هذا التعليق
شارك على الشبكات الإجتماعية

  • 1
بتاريخ 43 دقائق مضت قال Ahmed Emad35:

الخطأ هو انك لم تعطي الكود مصدر البيانات عليك استخدام خاصية DataSource كالتاللي :- 
 

<asp:Repeater id="Problemss" runat="server" DataSource="<%= SqlDataSource1.Select() %>">

        <HeaderTemplate>
            <table border="1" width="100%">
                <tr>
                    <th>تم</th>
                    <th>الحلول</th>
                    <th>المشكله</th>
                    <th>م</th>
                    <th>الرقم</th>
                </tr>
        </HeaderTemplate>

        <ItemTemplate>
            <tr>
                <td><%#DataItem("تم")%></td>
                <td><%#DataItem("الحلول")%></td>
                <td><%#DataItem("المشكله")%></td>
                <td><%#DataItem("م")%></td>
                <td><%#DataItem("الرقم")%></td>
            </tr>
        </ItemTemplate>

        <FooterTemplate>
            </table>
        </FooterTemplate>

    </asp:Repeater>

 

مازال يظهر خطاء ولم اعرف ايش السبب هاذهي صورة الخطاء:

خطاء 2.png

بتاريخ الآن قال كمال صالح محمد:

مازال يظهر خطاء ولم اعرف ايش السبب هاذهي صورة الخطاء:

خطاء 2.png

وهاذا هو  صور قاعدة البيانات المراد استقبال البيانات منها:

لقطة الشاشة 2023-12-25 015432.png

قاعدة البيانات.png

اسم الجدول.png

اسماء الحقول.png

رابط هذا التعليق
شارك على الشبكات الإجتماعية

  • 0
بتاريخ On 26‏/12‏/2023 at 21:25 قال Ahmed Emad35:

الخطأ هو انك لم تعطي الكود مصدر البيانات عليك استخدام خاصية DataSource كالتاللي :- 
 

<asp:Repeater id="Problemss" runat="server" DataSource="<%= SqlDataSource1.Select() %>">

        <HeaderTemplate>
            <table border="1" width="100%">
                <tr>
                    <th>تم</th>
                    <th>الحلول</th>
                    <th>المشكله</th>
                    <th>م</th>
                    <th>الرقم</th>
                </tr>
        </HeaderTemplate>

        <ItemTemplate>
            <tr>
                <td><%#DataItem("تم")%></td>
                <td><%#DataItem("الحلول")%></td>
                <td><%#DataItem("المشكله")%></td>
                <td><%#DataItem("م")%></td>
                <td><%#DataItem("الرقم")%></td>
            </tr>
        </ItemTemplate>

        <FooterTemplate>
            </table>
        </FooterTemplate>

    </asp:Repeater>

 

مازال يظهر خطاء ولاكن تم تغيير الكود وضهرلي خطاء جديد  اليك الكود التالي

<!DOCTYPE html>
<html lang="ar">
<head>
    <link rel="icon" href="https://c0.klipartz.com/pngpicture/573/614/gratis-png-ng%C5%A9-hanh-s%C6%A1n-distrito-casa-apartamento-inmobiliaria-volta-redonda-venta-de-logotipos-de-bienes-raices.png" />
    <title>موقع العقارات</title>
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Tajawal:wght@300&display=swap" rel="stylesheet">
    <meta charset="utf-8" />
    <link rel="stylesheet" type="text/css" media="screen" href="home.css">
</head>
<body>
    <header>
        <div>
            <img src="a.png" alt="نظام العقارات من كمال تجريبي">
        </div>
        <center>
            <div>
                <button>نقاط البيع</button>
                <button>أدارة المخزون</button>
                <button>الإراضي</button>
                <button>الشيكات</button>
                <button>الأستاذ العام</button>
                <button>إدارة النظام</button>
            </div>
        </center>
    </header>

    <?php
    $server = 'DESKTOP-PJDLJNR';
    $database = 'Legacy';
    $username = '';
    $password = '';

    $connection = new PDO("sqlsrv:Server=$server;Database=$database", $username, $password);
    if (!$connection) {
    die(print_r(sqlsrv_errors(), true));
    }
    $sql_query = 'SELECT * FROM Problemss';
    $statement = $connection->query($sql_query);
    ?>

    <table border="1" width="100%">
        <tr>
            <th>تم</th>
            <th>الحلول</th>
            <th>المشكلة</th>
            <th>م</th>
            <th>الرقم</th>
        </tr>

        

        <?php
        while ($row = $statement->fetch(PDO::FETCH_ASSOC)) {
        print_r($row);
        <tr>
            <td><?php echo $row['تم']?></td>
            <td><?php echo $row['الحلول']?></td>
            <td><?php echo $row['المشكلة']?></td>
            <td><?php echo $row['م']?></td>
            <td><?php echo $row['الرقم']?></td>
        </tr>
        }
        $connection->close();
        ?>
    </table>
</body>
</html>
رابط هذا التعليق
شارك على الشبكات الإجتماعية

انضم إلى النقاش

يمكنك أن تنشر الآن وتسجل لاحقًا. إذا كان لديك حساب، فسجل الدخول الآن لتنشر باسم حسابك.

زائر
أجب على هذا السؤال...

×   لقد أضفت محتوى بخط أو تنسيق مختلف.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   جرى استعادة المحتوى السابق..   امسح المحرر

×   You cannot paste images directly. Upload or insert images from URL.

  • إعلانات

  • تابعنا على



×
×
  • أضف...