Member Login

Username
Password
Forget Password
New Sign Up
Search Forum

Buy Support
Incidents

If you can't find your answer in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us private or confidential information:

Click Here
If you can't login and post questions or you are having trouble viewing forum posts:
Click Here
Callback
Support

If you live in USA, UK, Canada, Australia or New Zealand, you can leave us details on your question and request us to call you back and discuss them with you personally  (charges apply).

Click Here
 
Buy Support
Incidents
If you can't find your answer in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us private or confidential information:
Click Here

Forum : "Invalid Bookmark" error pulling info from Customer tableSearch Forum

Forum Home > QODBC - ODBC Driver for QuickBooks > QODBC v6 Forum

 New Topic 
 
 Post Reply 
[1]  
 "Invalid Bookmark" error pulling info from Customer table 
 Author   Message 
  Scott G 
  
 Group: Members 
 Posts: 1 
 Joined: 2006-10-24 
 Profile
 Posted : 2006-10-24 03:17:42

Hi,

I have a short VB script that pulls info from the Customer table and ultimately will dump it into a MySQL table.  The code I have is based on the examples on the QODBC site. 

I'm getting a "[QODBC] INvalid bookmark value" (code 80040E0E) in the middle of the script (line 17, char 1, as soon as it tries to dump the result into an array)

Windows 2000, QB v6 Enterprise edition, QODBC 7, connections all test fine and my SQL query works fine in the test app as well.

Is the QODBC 7 vs. QB v6 the problem?  Should I be using QODBC 6?

Code is below:

Dim oConnection
Dim oRecordset
Dim sMsg
Dim sConnectString
Dim sSQL
 
sConnectString = "DSN=Quickbooks Data;OLE DB Services=-2;"
sSQL = "SELECT Name,ParentRefFullName,contact,IsActive FROM Customer UNOPTIMIZED WHERE ParentRefListID<>''"
Set oConnection = CreateObject("ADODB.Connection")
Set oRecordset = CreateObject("ADODB.Recordset")

oConnection.Open sConnectString
oRecordset.Open sSQL, oConnection, adOpenStatic, adLockOptimistic
recordsarray=oRecordSet.GetRows()

oRecordset.Close
Set oRecordset = Nothing
oConnection.Close
Set oConnection = Nothing

'sConnectString = "DSN=Quickbooks Import"
'Set oConnection = CreateObject("ADODB.Connection")
'Set oRecordset = CreateObject("ADODB.Recordset")
 
oConnection.Open sConnectString

i=0


Do While (not i=11)
'sqltext="INSERT INTO customer (project,customer) VALUES ('" & recordsarray(i,0) &"','" & recordsarray(i,1) & "')"

echo recordsarray(i,0)


'oConnection.execute sqltext
i=i+1
Loop

oConnection.Close
Set oConnection = Nothing
MsgBox("OK")

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-10-24 14:45:48

No, everyone should be using QODBC v7.00.00.194 as it contains fixes to Build 176. You can try swaping back to QODBC v6, simply rename fqqb32.dll to fqqb32.194 and run the QODBC v6.00.00.176 installer. Let me know whether V6.00.00.176 works for you instead of V7.00.00.194.

 

  Top 
  Ken 
  
 Group: Members 
 Posts: 3 
 Joined: 2006-12-17 
 Profile
 Posted : 2006-12-19 04:45:00
Are there any further developments on this issue?

I am getting the same error message when attempting to work with queries through Access.

As a test, I copied and pasted the sample code from the Visual Basic/ADO example on this site into a module. When I run it, I get the "Invalid Bookmark" error when it reaches the oRecordset.MoveNext instruction.

Is it possible that I have something wrong in my setup somewhere?

I am using version 7.00.00.199

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-12-19 10:21:42

Copy this code to a file called test.vbs:

Const adOpenStatic = 3
Const adLockOptimistic = 3
 
Dim oConnection
Dim oRecordset
Dim sMsg
Dim sConnectString
Dim sSQL
 
sConnectString = "DSN=Quickbooks Data;OLE DB Services=-2;"
sSQL = "SELECT Name FROM Employee UNOPTIMIZED"
Set oConnection = CreateObject("ADODB.Connection")
Set oRecordset = CreateObject("ADODB.Recordset")
 
oConnection.Open sConnectString
oRecordset.Open sSQL, oConnection, adOpenStatic, adLockOptimistic
sMsg = "**********************" & Chr(10)
Do While (not oRecordset.EOF)
      sMsg = sMsg & oRecordSet.Fields("Name") & Chr(10)
      oRecordset.MoveNext
Loop
sMsg = sMsg & "**********************" & Chr(10)
MsgBox sMsg
 
oRecordset.Close
Set oRecordset = Nothing
oConnection.Close
Set oConnection = Nothing

 

Then double click on it in Windows Explorer to run it.

 

  Top 
  Ken 
  
 Group: Members 
 Posts: 3 
 Joined: 2006-12-17 
 Profile
 Posted : 2006-12-19 10:53:18
Thanks for the response. I copied the code and executed it as you had suggested and got the same result. The precise message returned was:

Script:     C:\Documents and Settings\.....\test.vbs
Line:       20
Char:      7
Error:      [QODBC] Invalid bookmark value
Code:     80040E0E
Source:  Microsoft OLE DB Provider for ODBC Drivers 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-12-19 11:28:32
QODBC v7.00.00.194, 199 and 200 have currently a ADO "Bookmark" bug when using the QODBC Optimizer. If you force the query to use QuickBooks, with the UNOPTIMIZED tag, the query will work with QODBC v7.00.00.199. I've added the UNOPTIMIZED tag to your query above and it should work now. 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-12-20 08:21:12

I've just tested QODBC v7.00.00.204 and it has fixed this problem. You no longer need to use the UNOPTIMIZED tag with 204. See: QODBC v7.0.0.204 Released for more.

Const adOpenStatic = 3
Const adLockOptimistic = 3
 
Dim oConnection
Dim oRecordset
Dim sMsg
Dim sConnectString
Dim sSQL
 
sConnectString = "DSN=Quickbooks Data;OLE DB Services=-2;"
sSQL = "SELECT Name FROM Employee"
Set oConnection = CreateObject("ADODB.Connection")
Set oRecordset = CreateObject("ADODB.Recordset")
 
oConnection.Open sConnectString
oRecordset.Open sSQL, oConnection, adOpenStatic, adLockOptimistic
sMsg = "**********************" & Chr(10)
Do While (not oRecordset.EOF)
      sMsg = sMsg & oRecordSet.Fields("Name") & Chr(10)
      oRecordset.MoveNext
Loop
sMsg = sMsg & "**********************" & Chr(10)
MsgBox sMsg
 
oRecordset.Close
Set oRecordset = Nothing
oConnection.Close
Set oConnection = Nothing

 

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to