惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Attack and Defense Labs
Attack and Defense Labs
T
Threatpost
C
Cybersecurity and Infrastructure Security Agency CISA
H
Hackread – Cybersecurity News, Data Breaches, AI and More
I
Intezer
C
Cyber Attacks, Cyber Crime and Cyber Security
The Register - Security
The Register - Security
量子位
Security Latest
Security Latest
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
大猫的无限游戏
大猫的无限游戏
小众软件
小众软件
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
C
CXSECURITY Database RSS Feed - CXSecurity.com
MyScale Blog
MyScale Blog
J
Java Code Geeks
Apple Machine Learning Research
Apple Machine Learning Research
Google DeepMind News
Google DeepMind News
WordPress大学
WordPress大学
Spread Privacy
Spread Privacy
Jina AI
Jina AI
博客园 - 【当耐特】
P
Palo Alto Networks Blog
Last Week in AI
Last Week in AI
SecWiki News
SecWiki News
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
G
GRAHAM CLULEY
宝玉的分享
宝玉的分享
Hacker News - Newest:
Hacker News - Newest: "LLM"
T
The Blog of Author Tim Ferriss
V
Vulnerabilities – Threatpost
有赞技术团队
有赞技术团队
T
Tor Project blog
H
Hacker News: Front Page
A
Arctic Wolf
NISL@THU
NISL@THU
A
About on SuperTechFans
云风的 BLOG
云风的 BLOG
Engineering at Meta
Engineering at Meta
V
V2EX
N
News and Events Feed by Topic
Webroot Blog
Webroot Blog
Know Your Adversary
Know Your Adversary
P
Privacy International News Feed
I
InfoQ
D
Docker
L
LINUX DO - 最新话题
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
U
Unit 42

博客园 - Gravitonium

AttributesError:XXXXX has no module named 'xfeatures2d' Install pyCuda on windows7 Install pytorch on windows7 Install face_recognition anaconda to install cv2 Install dlib on windows for python2.7 Solution for Python Extention matplotlib.pyplot loading Error Reactivate this account after 8-year-suspension RealPlayer10GOLD for FC5 installation problem Date comparison in SQL clauses How to sort out monitor "Sync out of range" problem for Linux Box VS.net 2003 “Linker Tools Error LNK2001” 解决方案 Java programming problem in linux box: Exception in thread "main" java.lang.NoClassDefFoundError Solution to MySQL Connection Problem Example of a Web client invoke WebService using ASP 彻底清除3721上网助手 How to remove rigistry entry from the list of services PERL之模式匹配 Access数据库执行insert语句产生的问题
Demonstration of Database programming using ADO.net with C# under console mode
Gravitonium · 2004-11-29 · via 博客园 - Gravitonium

/*
Description:
This is an example program that demonstrate how to use ADO.net to connect
the SQL server and retrieve data from it under the Console Mode.

Author:Fenghua Lu
Date: May 2, 03
*/
using System;
using System.Data;
using System.Data.OleDb;

class DbTest{
public static void Main(){
string sConnectionString="Provider=sqloledb;Data Source=localhost;Initial Catalog=polaris;User Id=sa;Password=polaris;";    
   OleDbConnection objConn=new OleDbConnection(sConnectionString);
      objConn.Open();
     
      OleDbCommand  objCmdSelect=new  OleDbCommand("select * from userinfo");
   OleDbDataAdapter objAdapter1=new OleDbDataAdapter();

   objAdapter1.SelectCommand=objCmdSelect; 
   objAdapter1.SelectCommand.Connection=objConn;
   
   IDataReader reader= objCmdSelect.ExecuteReader();
   
           while (reader.Read())
            {
             Console.WriteLine(@"{0:d} | {1,20:c} | {2:c} | {3}",reader["id"], reader["username"],reader["birthday"],reader["memo"]);
             Console.WriteLine("---------------------------------------------------------------------------");
            } 
        
   objConn.Close(); 
}
}