Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for successful export of emtpy Tables #10

Open
Xarno opened this issue Oct 28, 2013 · 0 comments
Open

Fix for successful export of emtpy Tables #10

Xarno opened this issue Oct 28, 2013 · 0 comments

Comments

@Xarno
Copy link

Xarno commented Oct 28, 2013

If there are no records then MoveFirst throw an exception.

@@ -704,12 +704,14 @@ Private Sub ExportTable(tbl_name As String, obj_path As String)
         If C <> 0 Then OutFile.write vbTab
         C = C + 1
         OutFile.write fieldObj.Name
     Next
     OutFile.write vbCrLf
-
-    rs.MoveFirst
+   
+    If rs.RecordCount > 0 Then
+        rs.MoveFirst
+    End If
     Do Until rs.EOF
         C = 0
         For Each fieldObj In rs.fields
             If C <> 0 Then OutFile.write vbTab
             C = C + 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant