Solved

VB.net Access Not a valid bokmark

Posted on 2013-01-31
5
354 Views
Last Modified: 2013-02-09
Hi. I am running the following code on two machines. On the machine that has Access it runs fine, but on the machine that doesn't have Access I get the error "Not a valid bookmark". Access was just copied as a .accdb file onto the machine that doesn't have MS Access. It has worked well for a year and suddenly this error

         Dim sSQL As String
            sSQL = "SELECT Info FROM Transactions WHERE TransactionID = " & sString & ""
            If My.Settings.Setting_CompanyID <> "" And My.Settings.Setting_CompanyID <> Nothing Then
                sSQL = sSQL & " And Co_ID = " & My.Settings.Setting_CompanyID
            End If

                Dim connection As New OleDbConnection(My.Settings.CS_Setting)
                Dim cmd As New OleDbCommand(sSQL, connection)
                connection.Open()
                Get_Info_Field = cmd.ExecuteScalar().ToString
                connection.Close()
0
Comment
Question by:murbro
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 38839188
Are you sure the error is in this block? Is it the ExecuteScalar line that throws the error?
0
 

Author Comment

by:murbro
ID: 38839197
Its hard to tell as the error only has a compiled version of my app on. The database looks like it was corrupt so I repaired it and still the error. The machine causing the errors has not got MS Access on and has a .accdb version instead of .accde (mess up by our install guy). Could this be the problem?
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 38839337
Not sure if that's the issue because never seen that sort of error with that type of code.
0
 

Accepted Solution

by:
murbro earned 0 total points
ID: 38850762
Turns out that Access was corrupt
0
 

Author Closing Comment

by:murbro
ID: 38870783
found the problem
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question