4
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

mindの研究 その66

Last updated at Posted at 2024-01-07

概要

mindが、謎なので調べてみた。
vbsの力を借りて、mdbを叩いてみた。

環境

  • windows11
  • mind 8.07
  • office 2007

サンプルコード


出力ファイルは ファイル。
エラー検査は
 エラー? ならば
  エラー文字列で 重大エラー
 つぎに
 。

メインとは
 「db.vbs」で 出力ファイルを 新規オープンし エラー検査し
 「Set db = CreateObject("ADODB.Connection")」で 出力ファイルに 一行書き込み エラー検査し
 「db.Open "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\pmind\db1.mdb"」で 出力ファイルに 一行書き込み エラー検査し
 「sql = "SELECT * FROM blog_data"」で 出力ファイルに 一行書き込み エラー検査し
 「Set rs = db.Execute(sql)」で 出力ファイルに 一行書き込み エラー検査し
 「Do Until rs.EOF」で 出力ファイルに 一行書き込み エラー検査し
 「    WScript.Echo "id: " && rs(0) && " title: " && rs(1) && " body: " && rs(2) && " modified: " && rs(3)」で 出力ファイルに 一行書き込み エラー検査し
 「    rs.MoveNext」で 出力ファイルに 一行書き込み エラー検査し
 「Loop」で 出力ファイルに 一行書き込み エラー検査し
 出力ファイルを クローズし エラー検査し
 「C:\Windows\SysWOW64\CScript.exe db.vbs」を プログラム実行
。


実行結果

>mdb0
Microsoft (R) Windows Script Host Version 5.812
Copyright (C) Microsoft Corporation. All rights reserved.

id: 1 title: test body: test modified: 2024/01/07 9:00:08

以上。

4
2
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?