2007年5月23日水曜日

sqlserverが崩壊しかけてる?

SQL Server has encountered 2 occurrence(s) of IO requests taking longer than 15 seconds to complete on file [d:\Program Files\Microsoft SQL Server\MSSQL\data\templog.ldf] in database [tempdb] (2). The OS file handle is 0x00000380. The offset of the latest long IO is: 0x00000000061400

サーバのraid1のdisk1が不正ブロックがあります。

The description for Event ID ( 17055 ) in Source ( MSSQLSERVER ) could not be found. It contains the following insertion string(s): .
18052
エラー : 823、レベル : 24、状態 : 2。

INSERT ...... SELECT文 型の不一致

excel→sqlserverで
excelの数字をスペースで消した場合後の式が#valueでエラーになる
そのまま転送しようとすると 型が一致しませんというエラーになる

サンプルコード

 With cnxls
.Provider = "Microsoft.Jet.OLEDB.4.0"
.ConnectionString = "Data Source=" & xlsdatapath & ";Extended Properties=Excel 8.0"
.CursorLocation = adUseClient
.Open
End With
'xlsの範囲からsqlのテーブルにデータを追加する

strsql = "INSERT INTO [odbc;Driver={SQL Server};" & _
"Server=サーバー名;Database=db名;Trusted_Connection=yes;connect timeout=180].テーブル名" & _
" select * FROM excel範囲名" & _
" where 年月 = '" & ymm & "'"

2007年5月21日月曜日

access runtimeでツールバーを表示するには


一覧画面でソートしたいというニーズがあります
マクロで ツールバー表示-テーブル:データシート
とするとソートボタンが使えるようになります

2007年5月14日月曜日

勘定奉行 汎用データ 適用は全角20文字まで

転送時、文字数を制限しないとこけます カンマ、。。。が正しくない

2007年5月10日木曜日

勘定奉行 伝発行からA4で印刷できないA4で印刷するには?

伝発行からの印刷は、伝票形式で印刷するため、
応用用紙の選択ができません。

応用用紙で印刷する場合は、
「F7:伝検索」 から印刷できます。

svchost.exeによってCPU使用率が100%となる不具合を解消する修正プログラムの提供開始


 




2007年3月のセキュリティ、修正プログラム関連情報


2007/03/19



svchost.exeによってCPU使用率が100%となる不具合を解消する修正プログラムの提供開始


http://www.atmarkit.co.jp/fwin2k/hotfix/hfb20070319/hfb20070319_01.html#01

修正プログラム パッケージ 916089 の適用後、Windows Update から更新プログラムをインストールすると、アクセス違反が発生する

http://support.microsoft.com/default.aspx?scid=kb;ja;927891

2007年5月9日水曜日

Windows 2003 ServerでのRAID-1の修復方法

Windows 2003 ServerでのRAID-1の修復方法
http://itpro.nikkeibp.co.jp/article/COLUMN/20051202/225630/?SS=imgview&FD=-546503498&ST=itpro_print

おすすめvbaの本

2007年5月8日火曜日

sqlsrver シングルユーザーモードを閉じるには

コマンドプロンプト画面を閉じる

前期繰越 補助科目を変更するとその他で差額がでる

総勘定科目と補助科目の合計がちがっているとそのたで差額が表示される
総勘定科目の合計もなおす
当然相手科目もなおす必要がある

2007年5月7日月曜日

pcom os対応表

http://www-06.ibm.com/jp/domino01/mkt/cnpages1.nsf/page/default-000AFD88

OS / プラットフォーム
V5.7
サポート
V5.8
サポート
V5.9
サポート
備考
Windows 95
×
×
延長サポートは2001年12月31日をもって終了しています
Windows 98
×
延長サポートは2006年6月30日をもって終了しています
Windows 98 Second Edition
×
延長サポートは2006年6月30日をもって終了しています
Windows Me
×
延長サポートは2006年6月30日をもって終了しています
Windows NT Workstation 4.0
×
延長サポートは2002年6月30日をもって終了しています
Windows NT Server 4.0
Standard Edition
×
延長サポートは2004年12月31日をもって終了しています
Windows NT Server 4.0
Enterprise Edition
×
延長サポートは2004年12月31日をもって終了しています
Windows NT Server 4.0
Terminal Server Edition
×
延長サポートは2004年12月31日をもって終了しています
Windows 2000 Professional
Windows 2000 Server
Windows Terminal Server サポートを含みます
Windows 2000 Advanced Server
Windows Terminal Server サポートを含みます
Windows XP
Home Edition
Windows XP
Professional Edition
Remote Desktop サポートを含みます
Windows XP
Professional x64 Edition
×
×
非SNA環境でサポートされます
Windows XP
Tablet PC Edition
Windows Server 2003
Standard Edition
Windows Terminal Server サポートを含みます
Windows Server 2003
Enterprise Edition
Windows Terminal Server サポートを含みます
Windows Server 2003
Standard x64 Edition
×
×
・Windows Terminal Server サポートを含みます
・非SNA環境でサポートされます
Windows Server 2003
Enterprise x64 Edition
×
×
・Windows Terminal Server サポートを含みます
・非SNA環境でサポートされます

2007年5月6日日曜日

dts actveX スクリプト ファイル名の動的変更 削除リネーム

as 転送ファイルの動的変更 テキストファイル操作

転送ファイルを動的に変えたいニーズが出ることがあります
asのファイル名を xxxx0705などと年月付にしているものを定期的にsqlserverに転送蓄積する場合や
日付を指定してサイズを抑えて転送したい場合です
excel vbaのサンプルですが、dts のactiveX の記述にも function main ~ end functionの間に書けばそのまま使えます
特定の行だけ更新がかけられればいいんですが、方法が分からないので別ファイルに書き出し、リネームという方法をとっています

Sub ttochg()
Dim oFSO
Dim x
Dim strLine
Dim strFilename

'as 転送ファイル ttoの抽出部分を書き換える
'6行目と7行目をcellで指定した日付に変える
'書き出すために別ファイルを作る
' instantiate the Scripting Object
Set FSO = CreateObject("Scripting.FileSystemObject")
strfile1 = "C:\Documents and Settings\aco\デスクトップ\ruisk.TTO"
strfile2 = "C:\Documents and Settings\aco\デスクトップ\ruisk2.TTO"
start01 = Cells(2, 2)
'dts グローバル変数を使う場合
'ymm=dtsGlobalVariables("年月")
end01 = Cells(2, 3)
ymdd = start01
GoSub chgdate
ymdm1 = ymdm
ymdd = end01
GoSub chgdate
ymdm2 = ymdm

'openスイッチ 1 input ,2 output ,3 append
' true/false 存在しない場合作成
Set f1 = FSO.OpenTextFile(strfile1, 1, False)
Set f2 = FSO.OpenTextFile(strfile2, 2, True)

' Open the file
a = 1
Do Until f1.AtEndOfLine
buf = f1.Readline
If a = 6 Then buf = "WHERE rui13 like 'H%' and rui02>=" & ymdm1
If a = 7 Then buf = "WHERE and rui02 <=" & ymdm2
f2.writeline buf
a = a + 1
Loop
f1.Close
f2.Close

Exit Sub

chgdate:
ymdm = Mid(Format(Year(ymdd), "0000"), 3, 2) + _
Format(Month(ymdd), "00") + Format(Day(ymdd), "00")

Return
End Sub
'--------------------------------------------------------------------------------------
Sub ttodel()
Dim oFSO
Dim x
Dim strLine
Dim strFilename
'ruiskを削除してruisk2をruiskにリネームする
' instantiate the Scripting Object
Set FSO = CreateObject("Scripting.FileSystemObject")
strfile1 = "C:\Documents and Settings\aco\デスクトップ\ruisk.TTO"
strfile2 = "C:\Documents and Settings\aco\デスクトップ\ruisk2.TTO"

ingRet = FSO.deletefile(strfile1)
ingRet = FSO.movefile(strfile2, strfile1)


Set FSO = Nothing
End Sub