powered by simpleCommunicator - 2.0.61     © 2026 Programmizd 02
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Форумы / Microsoft Access [игнор отключен] [закрыт для гостей] / (ADP) Проблема с экспортом View=>XLS
14 сообщений из 14, страница 1 из 1
(ADP) Проблема с экспортом View=>XLS
    #32187413
RV
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
RV
Гость
Доброго времени суток!
Создал проэкт ADP!

Необходимо экспортировать VIEW (MSSQL2000) в XLS.
Каким способом лучше это сделать?????????

Я выбрал:
DoCmd.OutputTo acOutputServerView, RepSQL, acFormatXLS, NameFileXLS

Вроде все ок... НО ПОЧЕМУ он только 10000 строк копирует... а более не хочет!!!

Спасибо!
...
Рейтинг: 0 / 0
(ADP) Проблема с экспортом View=>XLS
    #32187418
Sfagnum
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
На листе в екселе кол-во строк ограничено (скока точно не помню), может в этом соль
...
Рейтинг: 0 / 0
(ADP) Проблема с экспортом View=>XLS
    #32187426
Витал
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
В Excele 65 536 строк.
Если записи выводятся из формы, то там есть свойство - максимальное количество записей. Может корень - там.
...
Рейтинг: 0 / 0
(ADP) Проблема с экспортом View=>XLS
    #32187455
RV
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
RV
Гость
Изменил это свойство и в настройке проэкта.... на 100000
и в настройке формы.... облом...
Процесс идет... а потом на середине прерывается!!! :(
...
Рейтинг: 0 / 0
(ADP) Проблема с экспортом View=>XLS
    #32187456
Фотография АлексейК
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
есть такая гадость

у меня A2002 без сервис паков

в настройках стоит 100 000 записей
из таблицы видны все - из view хоть тресни только 10 000

у кого нибудь работает? версия ? сервиспаки?
...
Рейтинг: 0 / 0
(ADP) Проблема с экспортом View=>XLS
    #32187459
RV
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
RV
Гость
У меня A2002+SP2
...
Рейтинг: 0 / 0
(ADP) Проблема с экспортом View=>XLS
    #32187492
Фотография АлексейК
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
У меня A2002+SP2 тоже самое или работает?
...
Рейтинг: 0 / 0
(ADP) Проблема с экспортом View=>XLS
    #32187510
Rudenko Vitaly
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Не работает.... :(
...
Рейтинг: 0 / 0
(ADP) Проблема с экспортом View=>XLS
    #32187519
Фотография Senin Viktor
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
вы меня извиняйте, что встреваю. Слдучайно не ваш случай?
Код: plaintext
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58.
59.
60.
61.
62.
63.
64.
65.
66.
67.
68.
69.
70.
71.
72.
73.
74.
75.
76.
77.
78.
79.
80.
81.
82.
83.
84.
85.
86.
87.
88.
89.
90.
91.
92.
93.
94.
95.
96.
97.
98.
99.
100.
101.
102.
103.
104.
105.
106.
107.
108.
109.
110.
111.
112.
113.
114.
115.
116.
117.
118.
119.
120.
121.
122.
123.
124.
125.
126.
127.
128.
129.
130.
131.
132.
133.
134.
135.
136.
137.
138.
139.
140.
141.
142.
143.
144.
145.
146.
147.
148.
149.
150.
151.
152.
153.
154.
155.
156.
157.
158.
159.
160.
161.
162.
163.
164.
165.
166.
167.
168.
169.
170.
171.
172.
173.
174.
ACC2002: Action Query Does Not Affect All Valid Records in an Access Project 

Q287429


 --------------------------------------------------------------------------------
 
The information in this article applies to:

Microsoft Access  2002 

 --------------------------------------------------------------------------------
 
Advanced: Requires expert coding, interoperability, and multiuser skills. 

This article applies only to a Microsoft Access project (.adp). 



SYMPTOMS
After you run a stored procedure that updates, appends, or deletes records from a table, you notice that not all of the records that match the specified criteria are updated, appended, or deleted. 



CAUSE
The Default Max Records option is set to a lower number than the number of records that match the query's criteria. 



RESOLUTION
Use one of the following methods to work around this behavior.

NOTE: Method 2 and Method 3 allow the stored procedure to update, append, or delete the correct number of records. However, you may not see all of the changes if the Default Max Records option limits the number of records you can see. 

Method 1: Increase the Default Max Records Option
By setting the Default Max Records option, you can control how many records will be affected by action queries in the Access project. If you enter a zero (0), there is no limit. If you enter a number other than 0, only that number of records will be affected by action queries in the Access project. To change the Default Max Records option, follow these steps: 
Open the Access project (.adp) that you want to change the setting for.


On the Tools menu, click Options.


Click the Advanced tab.


Set the Default Max Records option under the Client-server settings box to a higher number, or set it to 0 to not limit the number of records affected. The setting you choose affects only the Access project that is currently open.


Click OK to close the Options dialog box.


Method 2: Add the SET ROWCOUNT Option to the Stored Procedure
Change the stored procedure's T-SQL to include the SET ROWCOUNT option. The SET ROWCOUNT option overrides the Default Max Records option for a specific stored procedure and has no affect on other stored procedures or queries. To change the stored procedure's T-SQL, follow these steps: 
In an Access project, open the stored procedure that you want to override the DefaultMaxRecords property for in Design view.


On the View menu, click SQL View.


Change the T-SQL to include the SET ROWCOUNT option. For example, if you follow the instructions in the  "Steps to Reproduce the Behavior"  section later in this article, you will create a stored procedure with T-SQL similar to: 

ALTER PROCEDURE dbo.spMakeOrders2Table
AS
SELECT dbo.Orders.*
INTO   dbo.Orders2
FROM   dbo.Orders 
To override the Default Max Records setting, you must change the code to: 

ALTER PROCEDURE dbo.spMakeOrders2Table
AS 
SET ROWCOUNT  0 
SELECT dbo.Orders.*
INTO   dbo.Orders2
FROM   dbo.Orders 
The numeric argument following the SET ROWCOUNT option can be any valid integer greater than or equal to zero ( 0 ). If you set the argument to  1  or higher, the stored procedure will only return or modify that number of rows. If you set the SET ROWCOUNT option to  0 , an unlimited number of records will be returned. 


Method  3 : Use an ADO Command Object to Run the Stored Procedure
When you execute a stored procedure by using an ADO command object, Access sends the SET ROWCOUNT  0  option to SQL Server before sending the instructions to execute the stored procedure. For example, if you follow the instructions in the  "Steps to Reproduce the Behavior"  section later in this article, you will create a stored procedure called spMakeOrders2Table. To run this query from an ADO command object, use VBA code similar to the following in a code module: 

Public Sub MakeNewTable()

   Dim cmd As ADODB.Command
   Set cmd = New ADODB.Command

   cmd.ActiveConnection = CurrentProject.Connection
   cmd.CommandText =  "spMakeOrders2Table" 
   cmd.Execute

   Set cmd = Nothing

End Sub 
This code will override the Default Max Records setting, and will affect an unlimited number of records. 



STATUS
This behavior is by design. 



MORE INFORMATION
The Default Max Records option is designed to limit the number of records returned in a query. However, it also limits the number of records affected by stored procedures that perform updates, inserts, or deletes. 

Steps to Reproduce the Behavior
Open the sample project NorthwindCS.adp.


On the View menu, point to Database Objects, and then click Tables.


Open the Orders table. Note that there are  830  records in the table.


Close the table.


On the Tools menu, click Options.


Click the Advanced tab.


Set the Default max records option to  500 , and then click OK to close the Options dialog box.


On the Insert menu, click Query.


In the New Query dialog box, click Design Stored Procedure, and then click OK.


In the Add Table dialog box, click the Orders table, click Add, and then click Close.


Click to select the * (All Columns) check box.


On the Query menu, click Make-Table Query.


Type Orders2 in the Table name box, and then click OK.


On the File menu, click Save. Save the stored procedure as spMakeOrders2Table.


On the Query menu, click Run. Note that you receive the message:


The stored procedure executed successfully but did not return records. 
Click OK to dismiss the message, and then close the query window.


On the View menu, point to Database Objects, and then click Tables.


On the View menu, click Refresh. Note that the Orders2 table appears in the tables list.


Open the Orders2 table.


Note that the table only contains  500  records although the original Orders table contains  830  records. 



REFERENCES
For more information about SQL Server programming commands such as SET ROWCOUNT, visit the Microsoft SQL Server Developer Center at the following Microsoft Web site: 

http://msdn.microsoft.com/sqlserver/
For additional information about how an Access project (.adp) uses the DefaultMaxRecords setting, click the article number below to view the article in the Microsoft Knowledge Base: 
Q283200 ACC2002: How Access Projects (ADPs) Use the DefaultMaxRecords Setting and the T-SQL SET ROWCOUNT Statement 

...
Рейтинг: 0 / 0
(ADP) Проблема с экспортом View=>XLS
    #32187576
Alexus12
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Нет, мужики и леди!
Это глюк при трансфере:
Эксцесс по умолчанию ставит ДРЕВНИЙ ФОРМАТ Экселя (то ли 2.0, то ли еще что), в котором (в формате) и есть ограничение на 10000 строк.

Надо или как-то переключить на вывод в новом экселе
или (как лучшее) выводить в csv,
благо никакого форматирования трансфер все равно не несет.
...
Рейтинг: 0 / 0
(ADP) Проблема с экспортом View=>XLS
    #32187692
Фотография АлексейК
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
2 Senin Viktor
в моем случе - это даже не SP а view , пробовал изменять параметры вьюва - ничего не помогает. глюк однако ))
...
Рейтинг: 0 / 0
(ADP) Проблема с экспортом View=>XLS
    #32187763
Хам трамвайный
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Эх, придется
тряхнуть стариной
умники
берите ответ
Параметры-Вкладка "Другие"
строка Настройка "Клиент-Сервер"
стоит количество записей
котрые возвращает
процедура, вью или таблица
при открытии
поменяйте на 0
и тогда все записи полетят
а по отношению к екселю
то тут дело ограничивается
23000 записей
сейчас не вспомню
тоже надо было выкидывать
в ексел
но раз эксел не принимай
то я ушел от этого
...
Рейтинг: 0 / 0
(ADP) Проблема с экспортом View=>XLS
    #32190056
Фотография AlexJuice
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
2 Хам трамвайный: ну написал же чел: стоИт 100000 по умолчанию!
Ноль, конечно, лучше ;0), но в данном случае это неважно

А вот я обошел это так: создал MDB, подключил вьюху через ODBC и прекрасно экспортировал.
...
Рейтинг: 0 / 0
(ADP) Проблема с экспортом View=>XLS
    #32190110
Фотография АлексейК
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Еще один глюк

поставил я как советовали "0"

открываю вьюху - 10 000
перезапускаю базу - 10 000

создаю новый вьюв - 23 456 - работает

глюк однако
...
Рейтинг: 0 / 0
14 сообщений из 14, страница 1 из 1
Форумы / Microsoft Access [игнор отключен] [закрыт для гостей] / (ADP) Проблема с экспортом View=>XLS
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]