From 035991ccc077e87b255ef4eeaec806261c5a5c25 Mon Sep 17 00:00:00 2001 From: halw Date: Mon, 22 Dec 2008 14:23:38 +0000 Subject: [PATCH] Author:halw Date:2008-12-22T14:23:38.000000Z git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@144 abb3cda0-5349-4a8f-a601-0c33ac3a8c38 --- .../ado-net-samples/adonet-sample.wiki | 23 +++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/documentation/current/platform-specifics/microsoft-windows/net/samples/ado-net-samples/adonet-sample.wiki b/documentation/current/platform-specifics/microsoft-windows/net/samples/ado-net-samples/adonet-sample.wiki index a74f2ee8..b6c08c19 100644 --- a/documentation/current/platform-specifics/microsoft-windows/net/samples/ado-net-samples/adonet-sample.wiki +++ b/documentation/current/platform-specifics/microsoft-windows/net/samples/ado-net-samples/adonet-sample.wiki @@ -51,15 +51,30 @@ When the display is finished, the application wait for you to pressed the return This application shows how to interact with a database. First the connection to the database is opened: - create my_sql_connection.make_from_connection_string (my_database) + create connection.make ("server=(local)\NetSDK;Trusted_Connection=yes;database=northwind") Then a request to the database is made: - create my_sql_command.make_from_cmd_text_and_connection (my_command, my_sql_connection) + create command.make ("select * from customers", connection) + connection.open + reader := command.execute_reader -Finally, the result of the request is displayed. +Finally, the result of the request is displayed: + + from + ok := reader.read + until + not ok + loop + io.put_string (reader.item ("CustomerID").to_string) + io.put_string ("%T%T") + io.put_string (reader.item ("CompanyName").to_string) + io.new_line + ok := reader.read + end + -This sample contains the following class: +This sample uses the following ADO.NET classes: * SQL_DATA_READER * SQL_CONNECTION * SQL_COMMAND