「MFCとデータベース - データベースの接続」の版間の差分

📢 Webサイト閉鎖と移転のお知らせ
このWebサイトは2026年9月に閉鎖いたします。
新しい記事は移転先で追加しております。(旧サイトでは記事を追加しておりません)

Wiki がページ「ODBCでデータベースに接続する」を「ODBCでデータベースに接続する(MFC)」に、リダイレクトを残さずに移動しました
文字列「</source>」を「</syntaxhighlight>」に置換
 
(同じ利用者による、間の2版が非表示)
32行目: 32行目:
== サンプルコード ==
== サンプルコード ==
* <big>'''SQL Serverを使用'''</big>
* <big>'''SQL Serverを使用'''</big>
  <source lang="cpp">
  <syntaxhighlight lang="cpp">
  #include <afx.h>
  #include <afx.h>
  #include <afxdb.h>
  #include <afxdb.h>
60行目: 60行目:
     return 0;
     return 0;
  }
  }
  </source>
  </syntaxhighlight>
<br>
<br>
* <big>'''Oracle Databaseを使用'''</big>
* <big>'''Oracle Databaseを使用'''</big>
  <source lang="cpp">
  <syntaxhighlight lang="cpp">
  #include <afx.h>
  #include <afx.h>
  #include <afxdb.h>
  #include <afxdb.h>
91行目: 91行目:
     return 0;
     return 0;
  }
  }
  </source>
  </syntaxhighlight>
<br>
<br>
* <big>'''MySQLを使用'''</big>
* <big>'''MySQLを使用'''</big>
  <source lang="cpp">
  <syntaxhighlight lang="cpp">
  #include <afx.h>
  #include <afx.h>
  #include <afxdb.h>
  #include <afxdb.h>
122行目: 122行目:
     return 0;
     return 0;
  }
  }
  </source>
  </syntaxhighlight>
<br>
<br>
* <big>'''Jet Databaseを使用'''</big>
* <big>'''Jet Databaseを使用'''</big>
  <source lang="cpp">
  <syntaxhighlight lang="cpp">
  #include <afx.h>
  #include <afx.h>
  #include <afxdb.h>
  #include <afxdb.h>
153行目: 153行目:
     return 0;
     return 0;
  }
  }
  </source>
  </syntaxhighlight>
<br>
<br>
* <big>'''Ace Databaseを使用'''</big>
* <big>'''Ace Databaseを使用'''</big>
  <source lang="cpp">
  <syntaxhighlight lang="cpp">
  #include <afx.h>
  #include <afx.h>
  #include <afxdb.h>
  #include <afxdb.h>
184行目: 184行目:
     return 0;
     return 0;
  }
  }
  </source>
  </syntaxhighlight>
<br><br>
<br><br>


__FORCETOC__
__FORCETOC__
[[カテゴリ:MFC]]
[[カテゴリ:MFC]]