VBA到SQL Server - 并非所有记录都加载 [英] VBA to SQL Server - not all records load

查看:82
本文介绍了VBA到SQL Server - 并非所有记录都加载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Excel VBA宏,可以将数据传递到SQL Server数据库表中。 它不会传递所有数据。 它在548中的504条记录中停止。

I have an Excel VBA macro that passes data into a SQL Server database table.  It will not pass all of the data.  It stops at 504 records out of 548.

整个宏使用较少的记录。 这是连接字符串属性吗? 我读了一些关于控制内存的扩展属性,但它应用于早期的SQL Server。

The entire macro works with fewer records.  Is this a connection string property?  I read something about an extended property that controlled memory, but it applied to earlier SQL Servers.

我使用的是Excel 2007和SQL Server 2012.

I am using Excel 2007 and SQL Server 2012.

EPG48

推荐答案

听起来数据类型不匹配。  Excel允许列中的任何类型的数据,因此您可以将行中的文本和数字直接放在同一列的下方或上方。  SQL Server要求您设置数据类型,并且数据必须符合
符合该类型。 仔细观察这些事情,断开连接应该是显而易见的。

It sounds like the data types don't match up.  Excel allows any kind of data in a column, so you can have text in a row and numbers directly below, or above that, in the same column.  SQL Server requires you to set the data type, and the data MUST conform to that type.  Look closely at these things and it should be obvious where the disconnect is.


这篇关于VBA到SQL Server - 并非所有记录都加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆