النتائج 1 إلى 4 من 4

الموضوع: asp.net dbConn

  1. #1
    التسجيل
    03-10-2005
    المشاركات
    1

    asp.net dbConn

    [first of all mabroook 3leekm el shaahar .
    i have a question on asp.net? could anyone who have experience in them tell me the steps of how to extablish a connection in the Visual Studio in order to connect the database to an the a particular form and view a table data in the data Grid??

    i hop i can find a quick answer from you guys

  2. #2
    التسجيل
    29-01-2005
    المشاركات
    43

    مشاركة: asp.net dbConn

    The ASP.PDF file
    التعديل الأخير تم بواسطة محمود خالد محمد ; 09-10-2005 الساعة 11:54 PM

  3. #3
    التسجيل
    29-01-2005
    المشاركات
    43

    مشاركة: asp.net dbConn

    I added a file to the attachments.....


    ok
    see that




    <<<< From MSDN >>>>>>>


    The .NET Framework includes a new data access technology named ADO.NET, an improvement to ADO. However, the classes that make up ADO.NET are different from the ADO objects that you might be familiar with. Some changes must be made to existing ADO applications to convert them to ADO.NET. The changes do not have to be made immediately for them to run under ASP.NET, however, as ADO will function under ASP.NET. Nonetheless, converting ADO applications to ADO.NET is worthwhile. For disconnected applications, ADO.NET offers performance advantages over ADO disconnected record sets. Whereas ADO requires that transmitting and receiving components be COM objects, ADO.NET transmits data in standard XML format so that COM marshaling or data-type conversions are not required.

    Data retrieved from a database is generally used in one of two ways. The records might be examined and manipulated by ASP code as a precursor to some other action without being displayed directly to the client, or the records simply might be displayed to the client in a table or grid. The examples in this topic show how to convert a typical ADO scenario to ADO.NET. There is a great deal more to the ADO.NET model than these short examples illustrate; this is simply a quick overview of how to port common ASP and ADO scenarios to the .NET Framework. For a more detailed introduction to ADO.NET, see the Overview of ADO.NET.

    Working with a Single Table

    The first block of code in the following example is typical of an ASP application that uses ADO to read and manipulate a set of records returned from a single SQL query. It uses an ADO Recordset object to read the data records returned from the Northwind sample database supplied with Microsoft Access. This code would be contained in a file with an .asp file name extension.

    [Visual Basic]<%@LANGUAGE=VBSCRIPT%><! This ASP example uses ADO to read records from a database and print twofields from all returned records to an ASP page. Connection to the Northwind database is through an ODBC system data source (DSN. ><html><body><% dim ADOconn, ADOrs, sqlstr sqlstr="SELECT * FROM Employees;" set ADOconn = Server.CreateObject("ADODB.Connection") ADOconn.Open "DSN = Test" set ADOrs = ADOconn.execute(sqlstr) if ADOrs.BOF and ADOrs.EOF then ' Query didn't return any records. Response.Write("No Records.") else ADOrs.MoveFirst Do While Not ADOrs.EOF Response.Write(Server.HtmlEncode(ADOrs("FirstName")) & " " _ & Server.HtmlEncode(ADOrs("LastName")) & "<br>") ADOrs.MoveNext Loop Response.Write("<p>End of data.") end if ADOrs.close set ADOrs = nothing%></body></html>



    The following example illustrates the minimum changes necessary to convert the preceding example to an ASP.NET application. Most of the changes are necessary to comply with new Visual Basic syntax. This file can be renamed with an .aspx file name extension and will run with ASP.NET. Revised lines appear in bold type. Note the addition of the

  4. #4
    التسجيل
    29-01-2005
    المشاركات
    43

    مشاركة: asp.net dbConn

    All u need can be found in

    Microsoft MSDN

    see: http://www.msdn.microsoft.com/library/default.asp

ضوابط المشاركة

  • لا تستطيع إضافة مواضيع جديدة
  • لا تستطيع الرد على المواضيع
  • لا تستطيع إرفاق ملفات
  • لا تستطيع تعديل مشاركاتك
  •