0

can someone help me to identify what is wrong with my code? i recheck and recode it many times as possible but still cant figure out the one error. it doesnt run.

Attachments vb_error.jpg 356.25 KB
4
Contributors
7
Replies
39
Views
3 Years
Discussion Span
Last Post by babyluxe03
0

try this

        Dim Connection As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;" & "Data Source='" & "your path" & "';" & "Persist Security Info=False;" & "Jet OLEDB:Database Password=" & "your pass" & ";")
        Connection.Open()
0

but i used adodb connection coz thats what our instructor taught us. Is it really required to use that Oledb Connection?

Dim cnn As New ADODB.Connection
Dim rst As New ADODB.Recordset

cnn.Open("DBQ=C:\Users\Regina\Documents\Bank.accdb;Driver={Microsoft Access Driver (*.mdb, *.accdb )};uid=;pwd=;")

0

sorry, my bad.
your code is working fine..but i think that you are working on 64bit computer.
for your code to work you need to choose X86 platform
Build - Configuration Manager - Active Solution platform - new - new platform select X86

Edited by oussama_1

0

The driver name has a space in the name that should not be there. Remove the space after *.accdb.

Change driver from:

Driver={Microsoft Access Driver (*.mdb, *.accdb )};

To:

Driver={Microsoft Access Driver (*.mdb, *.accdb)};
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.