'2009/10'에 해당되는 글 11건

  1. 2009/10/05 syntaxhighlighter 사용 코드
  2. 2009/10/05 JET OLEDB Connect Sample using DataAdapter
<PRE class="brush: xml;">
</PRE>

ActionScript3 as3
Bash/Shell bash, shell
C# c-sharp, csharp
C++ cpp, c
CSS css
Delphi delphi, pas, pascal
Diff diff, patch
Groovy groovy
JavaScript js, jscript, javascript
Java java
JavaFX jfx
Perl perl, pl
PHP php
Plain text plain, text
PowerShell ps, powershell
Python py, python
Ruby rails, ror, ruby
Scala scala
SQL sql
VisualBasic vb, vbnet
XML xml, xhtml, xslt, html, xhtml
크리에이티브 커먼즈 라이센스
Creative Commons License
이올린에 북마크하기(0) 이올린에 추천하기(0)
2009/10/05 18:40 2009/10/05 18:40
#region Using directives

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.OleDb;
using System.Drawing;
using System.Windows.Forms;

#endregion

namespace UsingADOManagedProvider
{
   partial class ADONetForm1 : Form
   {
      public ADONetForm1( )
      {
         InitializeComponent( );

         // connect to Northwind Access database
         string connectionString = "provider=Microsoft.JET.OLEDB.4.0; " + "data source = c:\\nwind.mdb";

         // get records from the customers table
         string commandString = "Select CompanyName, ContactName from Customers";

         // create the data set command object 
         // and the DataSet

         OleDbDataAdapter DataAdapter = new OleDbDataAdapter( commandString, connectionString );

         DataSet DataSet = new DataSet( );

         // fill the data set object
         DataAdapter.Fill( DataSet, "Customers" );

         // Get the one table from the DataSet
         DataTable dataTable = DataSet.Tables[0];

         // for each row in the table, display the info
         foreach ( DataRow dataRow in dataTable.Rows )
         {
            lbCustomers.Items.Add( dataRow["CompanyName"] + " (" + dataRow "ContactName"] + ")" );
         }
      }
   }
}
크리에이티브 커먼즈 라이센스
Creative Commons License
이올린에 북마크하기(0) 이올린에 추천하기(0)
2009/10/05 18:17 2009/10/05 18:17