Click here to Skip to main content
15,886,069 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
VB
Private Sub cmdRetrieve_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdRetrieve.Click

        Dim txtSQL, tempCust, UREDI As String
        Dim Mark As String
        Dim C45, C40, C20 As Integer
        Dim lSize As Long
        C45 = 0
        C40 = 0
        C20 = 0
        txtBC11.Text = "Searching..."
        txtPosNo.Text = "Searching..."
        txtGroup.Text = ""
        System.Windows.Forms.Application.DoEvents()
        'Rs1.Open "Select * FROM tblInManHeader, tblInManDetil, tblKPBC, tblPelabuhan, tblKemasan1, tblInManContainer, tblGrup Where NoBL = '" & Trim(txtBlNo) & "' And tblInManDetil.Car = tblInManHeader.Car And tblInManHeader.KdKPBC = tblKPBC.KdKPBC And tblInManDetil.DPelMuat = tblPelabuhan.KDPort And tblInManDetil.JNKemas = tblKemasan1.KDEDI And tblInManDetil.Car = tblInManContainer.Car And tblInManDetil.KDGrup = tblInManContainer.KDGrup And tblInManDetil.NoPos = tblInManContainer.NoPos And tblInManDetil.kdgrup = tblGrup.kdgrup", AccessConnect, adOpenStatic
        'Rs1.Open "Select * FROM tblInManHeader, tblInManDetil, tblKPBC, tblPelabuhan, tblKemasan1 Where NoBL = '" & Trim(txtBlNo) & "' And tblInManDetil.Car = tblInManHeader.Car And tblInManHeader.KdKPBC = tblKPBC.KdKPBC And tblInManDetil.DPelMuat = tblPelabuhan.KDPort And tblInManDetil.JNKemas = tblKemasan1.KDEDI", AccessConnect, adOpenStatic'
        Try
            Koneksi()
            Dim sql1 As New OleDbCommand
            sql1.Connection = database
            sql1.CommandType = CommandType.Text
            sql1.CommandText = "Select * FROM tblInManHeader,tblInManDetil,tblKPBC,tblPelabuhan Where NoBL = '" & Trim(txtBlNo.Text) & "' And tblInManDetil.Car = tblInManHeader.Car And tblInManHeader.KdKPBC = tblKPBC.KdKPBC And tblInManDetil.DPelMuat = tblPelabuhan.KDPort order by tblInManDetil.nobl"
            rd1 = sql1.ExecuteReader()
            rd1.Read()


The error just come when i replace the old database with the new one with the same name. Nothing has changed inside of database. It just change the record.

Somebody please help me.
Posted
Comments
Sergey Alexandrovich Kryukov 27-Oct-14 6:07am    
Why not following the advice give on this message? Make sure it exists and the name is spelled correctly.
—SA
Robert Welliever 27-Oct-14 6:16am    
Are the old and new databases compatible with the same adapter? I'm not sure about you're data source and destination, but I had a project where I could only use Jet OleDB with old Excel files and I had to use a different OleDB connection for new Excel files. Are you using different version of Access across the big format switch? Like a 2003 version and a 2007 or newer version?

1 solution

i am using ms.access. i have already checked that table and it is exits. Nothing different in version of the database. Like i said. It just changed the record not the table.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900