Hi, i am trying to make an application that can show report using report viewer and the application can also show pdf file saved in the database. Both of it are running well in my computer. But when i install the application using x64 platform (mine is x86), all those action cant be run. it turns error like this:
" Could not find file 'C:\Users\tiwi\AppData\Local\Apps\2.0\Data\XOPMCLLEJ3Q\KV5LQHME.4A7]ulpj.tion_f2b1c5fe86104d_0001.000_17c245daa62a8b0\Data\Database2.accdb'
All the datagridview that use the same database are running well, only the report viewer dan pdf viewer that show that error. please help
here is my code to save pdf file in database
Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click
Call PathFile()
Dim sConnString As String
oleAccCon = New OleDbConnection(StrAccConn)
Using oleAccCon
'Create Command Object, To Make Use Of SQL Query
'Dim oleAccCommand As New OleDbCommand(strAccQuery, oleAccCon)
If Microsoft.VisualBasic.Right(Application.StartupPath, 1) = "\" Then
sConnString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=Database2.accdb;Persist Security Info=False;"
Else
sConnString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=Database2.accdb;Persist Security Info=False;"
End If
Conn = New OleDbConnection(sConnString)
Conn.Open()
cmd.Connection = Conn
'If (TbHps.Text <> "") And (TbGambar.Text <> "") And (TbBoq.Text <> "") And (TbKontrak.Text <> "") And (TbSpek.Text <> "") Then
strAccQuery = "INSERT INTO tbFileBarang (nama_skpd, nama_paket, path_hps, path_boq, path_gambarkerja, path_kak, path_spekteknis, path_rancangankontrak) VALUES (@namaskpd, @namapaket, @pathhps,@pathboq,@pathgambar, @pathkak, @pathspek, @pathkontrak)"
' Else
' cmd.CommandText = "UPDATE tbFileKonstruksi set image_description = @img_desc, [image] = @img where id=@id"
'End If
oleAccCon = New OleDbConnection(StrAccConn)
Dim oleAccCommand As New OleDbCommand(strAccQuery, oleAccCon)
MessageBox.Show(pathFullHps)
MessageBox.Show(pathFullBoq)
MessageBox.Show(pathFullGambar)
MessageBox.Show(pathFullKak)
MessageBox.Show(pathFullKontrak)
MessageBox.Show(pathFullSpek)
oleAccCommand.Parameters.AddWithValue("namaskpd", CbSkpd.Text)
oleAccCommand.Parameters.AddWithValue("namapaket", CbPaket.Text)
oleAccCommand.Parameters.AddWithValue("pathhps", pathFullHps)
oleAccCommand.Parameters.AddWithValue("pathboq", pathFullBoq)
oleAccCommand.Parameters.AddWithValue("pathgambar", pathFullGambar)
oleAccCommand.Parameters.AddWithValue("pathkak", pathFullKak)
oleAccCommand.Parameters.AddWithValue("pathspek", pathFullSpek)
oleAccCommand.Parameters.AddWithValue("pathkontrak", pathFullKontrak)
oleAccCon.Open()
oleAccCommand.ExecuteNonQuery()
End Using
'cmd.ExecuteNonQuery()
MsgBox("Image has been save.")
End Sub
what is wrong with this code ?