2014-02-12 4 views
1

저는 Jet.OLEDB.4.0 연결 문자열을 사용하는 기존의 시각적 기본 응용 프로그램을 만들고 있습니다. 사용자가 응용 프로그램의 데이터베이스 (.mdb 파일)를 네트워크 위치로 이동하려고합니다. 사용자가 새 데이터 파일 위치를 설정하도록 허용 할 수 있었고 모든 것이 작동했지만 db가 로컬 시스템에있을 때와 비교할 때 매우 느립니다. Microsoft는 연결 문자열 (http://support.microsoft.com/kb/246560/EN-US)에서 PageTimeout 속성을 변경하는 것이 좋습니다. 그 곳에서 문제가 발생합니다. 다음은 작동하지만 느린 연결 문자열입니다. "설치 가능한 ISAM을 찾을 수 없습니다"Jet.OLEDB.4.0 연결 문자열 오류

Public connStr As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & My.Settings.DataFolderPath & "\Data.mdb;Persist Security Info=True;Jet OLEDB:Database Password=Password;" 

나는 내가 얻는있는 PageTimeout 속성을 추가하려고하면은 Visual Studio에서 오류가 발생했습니다. 나는 여기서 정말로 간단한 것을 놓치고 있으며 이것은 느린 네트워크 성능을 고칠 수 없을지도 모른다. 다음은 오류를 던지고 연결 문자열은 다음과 같습니다

Public connStr As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & My.Settings.DataFolderPath & "\Data.mdb;Persist Security Info=True;Jet OLEDB:Database Password=Password;PageTimeout=5000" 

가 나는 또한

Public connStr As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & My.Settings.DataFolderPath & "\Data.mdb;Persist Security Info=True;Jet OLEDB:Database Password=Password;Jet OLEDB:PageTimeout=5000" 

이 크게 감사하겠습니다 제공 할 수있는 어떤 도움

을 시도했다.

+0

http://support.microsoft.com/kb/209805/en-us – Crono

답변

0

이것은 아마도 사용자의 문제에 대한 해결책은 아니지만 잠재적 인 빠른 수정으로 DSN을 사용해 보았습니까? Windows ODBC에서이를 설정하면 다음과 같이 연결 문자열을 변경할 수 있습니다.

"DSN = MyDSN; PageTimeout = 5000;"

다시 말하지만이 방법은 해결책이 될 수는 없지만 그 동안 이동하는 데는 빠른 해결 방법이 될 수 있습니다.

+1

루슬란 고마워. 내가 찾은 것부터 DSN을 사용하면 PageTimeout 속성을 설정할 수 있습니다. 불행히도 지연은 여전히 ​​네트워크를 통해 중요하지만 관련이없는 것으로 보입니다. 사용자는 이미 실행중인 서버가 있으며이 시점에서 최선의 방법은 백엔드 db를 SQLServer로 업그레이드하는 것입니다. 귀하의 대답은 나열된 문제에 맞습니다. 다시 한번 감사드립니다. – user3298001

+0

괜찮습니다! 다행히 도울 수있어 :) – Ruslan

1

맞춤법은 다르다 :

Jet OLEDB:Page Timeout // note the space 

전체 문서 here : KB 318161의 설명에

Jet OLEDB:Page Timeout (DBPROP_JETOLEDB_PAGETIMEOUT)

Indicates the number of milliseconds Jet will wait before checking to see whether its cache is out of date with the database file.

그럼에도 불구하고, 값이 전혀 연결 문자열에 설정할 수 없습니다 :

The Microsoft OLE DB Provider for Jet includes many custom properties that you can set only after you establish a connection to the database. These provider-specific properties are custom OLE DB session properties. You cannot set these properties in the ADO OLE DB connection string; you must set these properties after the connection is opened.

This error occurs when you specify the following Jet-specific properties in the connection string:

  • Jet OLEDB:ODBC Command Time Out
  • Jet OLEDB:Max Locks Per File
  • Jet OLEDB:Implicit Commit Sync
  • Jet OLEDB:Flush Transaction Timeout
  • Jet OLEDB:Lock Delay
  • Jet OLEDB:Max Buffer Size
  • Jet OLEDB:User Commit Sync
  • Jet OLEDB:Lock Retry
  • Jet OLEDB:Exclusive Async Delay
  • Jet OLEDB:Shared Async Delay
  • Jet OLEDB:Page Timeout
  • Jet OLEDB:Recycle Long-Valued Pages
  • Jet OLEDB:Reset ISAM Stats
  • Jet OLEDB:Connection Control
  • Jet OLEDB:ODBC Parsing
  • Jet OLEDB:Page Locks to Table Lock
  • Jet OLEDB:Sandbox Mode
  • Jet OLEDB:Transaction Commit Mode