VB2005 SP1 - ADODB - Vista (64-bit) RRS feed

  • 問題

  • Below code works in VB2005 - XP,



    Could anyone help ? Thank you very much !!


            Dim CN As New ADODB.Connection
            Dim RS As New ADODB.Recordset


            With CN

                .Provider = "microsoft.jet.oledb.4.0"
                .ConnectionString = "data source=" & "D:\Database.mdb"

                .Mode = ADODB.ConnectModeEnum.adModeShareDenyNone
                .CursorLocation = ADODB.CursorLocationEnum.adUseClient


            End With


    I have another project using VB6 to open the file is OK, seems not permission problem.

    Is it any problem related to OLEDB ?


    2007年8月18日 下午 12:55


  • 在 VBNET 下,請配合使用 ADONET ... ADO 支援情形有多少,沒有很清楚的記載。


    2007年8月18日 下午 02:03
  • Finally, I find the answer for that Case.


    In the settings for the project under the Build Tab you must set Platform target to x86 instead of Any CPU


    May be Microsoft.Jet.OLEDB.4.0' provider   for 64-bit is not support.


    I still use ADODB because some programme start from VB 6.

    So hard to change entirely.

    Personally, I fell ADODB is better then ADONET, may be this is habit.



    Anyway, thanks very much !

    2007年8月20日 下午 02:05