VB2008で文書検索のソフトを作成したのですが、
サーバ上に置いている実行ファイルを複数PCからアクセスすると、
2台目以降のPCが起動した時にエラーがでます。
職場のPCを入れ替える前は複数のPCからアクセスしても問題ありませんでした。
エラーの理由が分かる方がいらっしゃれば教えてください。
よろしくお願いします。
職場のPCはWINXPです。
エラーの内容
************** Exception Text **************
System.IO.IOException: The process cannot access the file '\\文書検索\info.dat' because it is being used by another process.
at Microsoft.VisualBasic.FileSystem.FileOpen(Int32 FileNumber, String FileName, OpenMode Mode, OpenAccess Access, OpenShare Share, Int32 RecordLength)
at 文書管理システム.FormMain.FormMain_Load(Object eventSender, EventArgs eventArgs)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
No.1ベストアンサー
- 回答日時:
>Microsoft.VisualBasic.FileSystem.FileOpen(Int32 FileNumber, String FileName, OpenMode Mode, OpenAccess Access, OpenShare Share, Int32 RecordLength)
ってなってますから、OpenShare Shareに共有可能かどうかの指定が可能なのでは。
ここらあたりを参考に
http://msdn.microsoft.com/ja-jp/library/microsof …
お探しのQ&Aが見つからない時は、教えて!gooで質問しましょう!
関連するカテゴリからQ&Aを探す
おすすめ情報
- ・漫画をレンタルでお得に読める!
- ・街中で見かけて「グッときた人」の思い出
- ・「一気に最後まで読んだ」本、教えて下さい!
- ・幼稚園時代「何組」でしたか?
- ・激凹みから立ち直る方法
- ・1つだけ過去を変えられるとしたら?
- ・【あるあるbot連動企画】あるあるbotに投稿したけど採用されなかったあるある募集
- ・【あるあるbot連動企画】フォロワー20万人のアカウントであなたのあるあるを披露してみませんか?
- ・映画のエンドロール観る派?観ない派?
- ・海外旅行から帰ってきたら、まず何を食べる?
- ・誕生日にもらった意外なもの
- ・天使と悪魔選手権
- ・ちょっと先の未来クイズ第2問
- ・【大喜利】【投稿~9/7】 ロボットの住む世界で流行ってる罰ゲームとは?
- ・推しミネラルウォーターはありますか?
- ・都道府県穴埋めゲーム
- ・この人頭いいなと思ったエピソード
- ・準・究極の選択
- ・ゆるやかでぃべーと タイムマシンを破壊すべきか。
- ・歩いた自慢大会
- ・許せない心理テスト
- ・字面がカッコいい英単語
- ・これ何て呼びますか Part2
- ・人生で一番思い出に残ってる靴
- ・ゆるやかでぃべーと すべての高校生はアルバイトをするべきだ。
- ・初めて自分の家と他人の家が違う、と意識した時
- ・単二電池
- ・チョコミントアイス
デイリーランキングこのカテゴリの人気デイリーQ&Aランキング
-
UserForm1.Showでエラーになり...
-
String""から型'Double'への変...
-
VBAでfunctionを利用しようとし...
-
【VBA】ワークブックを開く時に...
-
【VBAエラー】Nextに対するFor...
-
On ErrorでエラーNoが0
-
オブジェクト型の変数にフォー...
-
ExecuteNonQueryメソッドの戻り値
-
pythonのopenpyxlについて
-
実行時エラー 438 の解決策をお...
-
フランスの生年月日(jj/mm/aaaa)
-
お助けください!VBAのファイル...
-
「実行時エラー '3167' レコー...
-
ACCESSで値を代入できないとは?
-
Perlのエラーについてご教授く...
-
マクロで"#N/A"のエラー行を削...
-
VB2008 comboboxを連動させた...
-
エクセルVBAでApplication.Sum...
-
mailstorehomeのエクスポートで...
-
VB6とVB.NETでNullの扱いが違う?
マンスリーランキングこのカテゴリの人気マンスリーQ&Aランキング
-
UserForm1.Showでエラーになり...
-
VBAでfunctionを利用しようとし...
-
【VBA】ワークブックを開く時に...
-
文字列内で括弧を使うには
-
Pythonでの文字列からfloatへの...
-
String""から型'Double'への変...
-
On ErrorでエラーNoが0
-
お助けください!VBAのファイル...
-
2つほどお聞きしたいことがあり...
-
マクロで"#N/A"のエラー行を削...
-
Excel vbaについての質問
-
【VBAエラー】Nextに対するFor...
-
実行時エラー 438 の解決策をお...
-
実行時エラー'-2147467259(8000...
-
ACCESSで値を代入できないとは?
-
VBA データ(特定値)のある最...
-
「実行時エラー '3167' レコー...
-
【VB.NET】 パワポ操作を非表示で
-
マクロの「SaveAs」でエラーが...
-
ApplicationとWorksheetFunctio...
おすすめ情報