无法执行SQL语句 [英] Can't execute a SQL statement
问题描述
我使用以下代码将MS Excel电子表格中的数据附加到MS Access表中。在MS Excel中我定义了数据范围;对于下面的代码我称之为Stage。这曾经是过去的工作;但是,现在我收到一条错误消息,指出数据
引擎无法找到对象Stage。代码在SQL执行语句中断开。任何想法为什么我的数据引擎不再识别舞台了,还有其他方法可以解决这个问题吗?非常感谢
I use the following code to append data from MS Excel spreadsheet into MS Access table. In MS Excel I define the data range; for the code below I call it Stage. This used to work in the past; however, now I'm getting an error message stating that the data engine could not find the object Stage. The code breaks on the SQL execution statement. Any ideas why i the data engine is not recognizing Stage anymore and is there any other way to go about this? Many thanks
推荐答案
您好,
您的代码看起来像VB6,而本论坛仅适用于VB.NET发布问题的横幅。
Your code sure looks like VB6 while this forum is solely for VB.NET as stated in the banner when posting your question.
如果这是VB6,那么使用
这个论坛。如果这个代码是在VB.NET中完成的,那么你首先需要使用VB.NET方法,例如不要使用ADODB RecordSets等。
If this is VB6 then use this forum. If this code is being done in VB.NET then you first need to use VB.NET methods e.g. don't use ADODB RecordSets etc.
这篇关于无法执行SQL语句的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!