Home > Software engineering >  In SQL data loss when reading data
In SQL data loss when reading data

Time:09-16

Sub test ()
Set the cn=CreateObject (" adodb. Connection ")
Cn. The Open ". The provider=Microsoft jet. The oledb. 4.0; Extended properties=8.0 excel; Data source="& amp; ThisWorkbook. Path & amp; "\ data files \ auxiliary worksheet. XLS"
Sql="select * from [clock in formal $]"
ThisWorkbook. Sheets (1). [a1]. CopyFromRecordset cn. The Execute (Sql)
Sql="select * from [attendance detail $]"
ThisWorkbook. Sheets (2). [a1]. CopyFromRecordset cn. The Execute (Sql)
Cn. Close
End Sub

CodePudding user response:

Hope ace answer

CodePudding user response:

I hope this post can help you, as if the same problem with you

http://club.excelhome.net/forum.php? Mod=viewthread& Tid=1256953 & amp; Highlight=

CodePudding user response:

Is listed as the column name with parentheses what inside

CodePudding user response:

refer to the second floor response: VB amateurs
hope this post can help you, as if the same problem with you

http://club.excelhome.net/forum.php? Mod=viewthread& Tid=1256953 & amp; Highlight=
the same as the original poster, version can't change, the back of the column can not delete, like 23:59:59 should not column problem at that time

CodePudding user response:

reference 3 floor crispy large ice cream response:
is listed as the column name with parentheses what inside
no parenthesis
  •  Tags:  
  • VBA
  • Related