Этот баннер — требование Роскомнадзора для исполнения 152 ФЗ.
«На сайте осуществляется обработка файлов cookie, необходимых для работы сайта, а также для анализа использования сайта и улучшения предоставляемых сервисов с использованием метрической программы Яндекс.Метрика. Продолжая использовать сайт, вы даёте согласие с использованием данных технологий».
Политика конфиденциальности
|
|
|
db2+php+xml-size
|
|||
|---|---|---|---|
|
#18+
всем доброго времени суток! как установить размер привязываемого параметра для db2_bind_param ? по-умолчанию размер строкового параметра не более 1МБ Код: plaintext 1. 2. 3. 4. 5. Specifies the precision with which the variable should be bound to the database. This parameter can also be used for retrieving XML output values from stored procedures. A non-negative value specifies the maximum size of the XML data that will be retrieved from the database. If this parameter is not used, a default of 1MB will be assumed for retrieving the XML output value from the stored procedure. при попытке выполнить привязку параметра Код: plaintext 1. 2. 3. 4. 5. 6. 7. 8. Код: plaintext ни в примерах, ни в доках нигде не нашел путей решения проблемы... :( ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 27.08.2010, 10:57 |
|
||
|
db2+php+xml-size
|
|||
|---|---|---|---|
|
#18+
jack_nsk, Какая версия DB2 ? В состав какого решения входит ? С уважением, Вадим. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 27.08.2010, 12:35 |
|
||
|
db2+php+xml-size
|
|||
|---|---|---|---|
|
#18+
jack_nsk, Попробуй через файл ... db2_bind_param( ...., DB2_PARAM_FILE) <?php $stmt = db2_prepare($conn, "INSERT INTO animal_pictures(picture) VALUES (?)"); $picture = "/opt/albums/spook/grooming.jpg"; $rc = db2_bind_param($stmt, 1, "picture", DB2_PARAM_FILE); $rc = db2_execute($stmt); ?> С уважением, Вадим. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 27.08.2010, 12:46 |
|
||
|
db2+php+xml-size
|
|||
|---|---|---|---|
|
#18+
GVF112GVF Какая версия DB2 ? В состав какого решения входит ? DB2 LUW 9.7 express-c GVF112GVF Попробуй через файл ... db2_bind_param( ...., DB2_PARAM_FILE) <?php $stmt = db2_prepare($conn, "INSERT INTO animal_pictures(picture) VALUES (?)"); $picture = "/opt/albums/spook/grooming.jpg"; $rc = db2_bind_param($stmt, 1, "picture", DB2_PARAM_FILE); $rc = db2_execute($stmt); ?> предварительно сделал сохранение текстовой переменной во временный файл Код: plaintext 1. 2. 3. 4. 5. Код: plaintext 1. 2. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 27.08.2010, 13:17 |
|
||
|
db2+php+xml-size
|
|||
|---|---|---|---|
|
#18+
jack_nsk, Посмотри здесь: DB2 Viper http://www.ibm.com/developerworks/data/library/techarticle/dm-0511singh/ Create a database connection $conn =db2_connect($dbname, $dbuser, $dbpass); Open the document from the file into a variable $fileContents = file_get_contents("products/p1.xml"); Create a simple XML object from this variable $dom = simplexml_load_string($fileContents); Extract the product ID from the document $prodID = (string) $dom["pid"]; Create a prepared statement to insert the XML document into the database $stmt =db2_prepare($conn, "INSERT INTO xmlproduct VALUES (?, ?)"); Pass the product ID extracted from the document along with the document as a parameter to the query db2_execute($stmt, array($prodID, $fileContents); С уважением, Вадим. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 27.08.2010, 18:54 |
|
||
|
db2+php+xml-size
|
|||
|---|---|---|---|
|
#18+
jack_nsk, PS: DB2 9 pureXML Guide http://www.redbooks.ibm.com/redbooks/pdfs/sg247315.pdf DB2 Express-C: The Developer Handbook for XML, PHP, C/C++, Java, and .NET http://www.redbooks.ibm.com/redbooks/pdfs/sg247301.pdf С уважением, Вадим. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 27.08.2010, 19:04 |
|
||
|
db2+php+xml-size
|
|||
|---|---|---|---|
|
#18+
jack_nskвсем доброго времени суток! как установить размер привязываемого параметра для db2_bind_param ? по-умолчанию размер строкового параметра не более 1МБ Код: plaintext 1. 2. 3. 4. 5. Specifies the precision with which the variable should be bound to the database. This parameter can also be used for retrieving XML output values from stored procedures. A non-negative value specifies the maximum size of the XML data that will be retrieved from the database. If this parameter is not used, a default of 1MB will be assumed for retrieving the XML output value from the stored procedure. при попытке выполнить привязку параметра Код: plaintext 1. 2. 3. 4. 5. 6. 7. 8. Код: plaintext ни в примерах, ни в доках нигде не нашел путей решения проблемы... :( Не уверен что поможет, можно попробывать увеличить значение параметра- (rqrioblk), сlient I/O block size configuration parameter. С уважением, Вадим. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 28.08.2010, 10:24 |
|
||
|
db2+php+xml-size
|
|||
|---|---|---|---|
|
#18+
GVF112GVF Не уверен что поможет, можно попробывать увеличить значение параметра- (rqrioblk), сlient I/O block size configuration parameter. С уважением, Вадим. ПХП - таки open-source... :) смотрю в исходниках там есть любопытный кусок кода Код: 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. в примерах в исходниках есть что-то подобное... Код: plaintext 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 28.08.2010, 11:09 |
|
||
|
db2+php+xml-size
|
|||
|---|---|---|---|
|
#18+
однако, как оказалось, не всё так просто... посмотрел пример создания хранимой процедуры с использованием функций поддержки XML попробовал создать подобное в редакторе команд... ан нет! авторSQL0440N Не найдено доступной подпрограммы "XMLPARSE" типа "FUNCTION автор Информация соединения с базой данных Сервер баз данных = DB2/NT 9.7.2 ID авторизации SQL = USER Алиас локальной базы данных = SAMPLE ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 28.08.2010, 11:58 |
|
||
|
db2+php+xml-size
|
|||
|---|---|---|---|
|
#18+
jack_nskGVF112GVF Не уверен что поможет, можно попробывать увеличить значение параметра- (rqrioblk), сlient I/O block size configuration parameter. С уважением, Вадим. ПХП - таки open-source... :) смотрю в исходниках там есть любопытный кусок кода Код: 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. в примерах в исходниках есть что-то подобное... Код: plaintext 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. А что это за параметр - sql_precision = 1048576 ?! Если его увеличить в два раза .... :) С уважением, Вадим. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 28.08.2010, 12:20 |
|
||
|
db2+php+xml-size
|
|||
|---|---|---|---|
|
#18+
FYI ... precision - Specifies the precision with which the variable should be bound to the database. This parameter can also be used for retrieving XML output values from stored procedures. A non-negative value specifies the maximum size of the XML data that will be retrieved from the database. If this parameter is not used, a default of 1MB will be assumed for retrieving the XML output value from the stored procedure. http://php.net/manual/en/function.db2-bind-param.php db2_bind_param ibm_db2 function - Binds a PHP variable to an SQL statement parameter - http://publib.boulder.ibm.com/infocenter/db2luw/v9/index.jsp?topic=/com.ibm.db2.udb.apdv.php.doc/doc/r0022495.htm Binding PHP variables to a prepared statement The SQL statement in the following example uses two input parameters in the WHERE clause. We call db2_bind_param() to bind two PHP variables to the corresponding SQL parameters. Notice that the PHP variables do not have to be declared or assigned before the call to db2_bind_param(); in the example, $lower_limit is assigned a value before the call to db2_bind_param(), but $upper_limit is assigned a value after the call to db2_bind_param(). The variables must be bound and, for parameters that accept input, must have any value assigned, before calling db2_execute(). С уважением, Вадим. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 28.08.2010, 12:32 |
|
||
|
db2+php+xml-size
|
|||
|---|---|---|---|
|
#18+
GVF112GVFjack_nsk ПХП - таки open-source... :) смотрю в исходниках там есть любопытный кусок кода Код: plaintext 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. А что это за параметр - sql_precision = 1048576 ?! Если его увеличить в два раза .... :) С уважением, Вадим. авторprecision Specifies the precision with which the variable should be bound to the database. This parameter can also be used for retrieving XML output values from stored procedures. A non-negative value specifies the maximum size of the XML data that will be retrieved from the database. If this parameter is not used, a default of 1MB will be assumed for retrieving the XML output value from the stored procedure. по-умолчанию, размер привязываемого параметра не более 1МБ... если только перекомпилировать под линуксом... :) ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 28.08.2010, 13:48 |
|
||
|
db2+php+xml-size
|
|||
|---|---|---|---|
|
#18+
jack_nsk, Есть несколько путей решения - простой, сложный и очень сложный. Труднее всего - найти простой ... и опыт сын ошибок трудных ... :) Думаю, что проблему можно обойти. Как - решать Вам ... ;) С уважением, Вадим. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 28.08.2010, 21:04 |
|
||
|
db2+php+xml-size
|
|||
|---|---|---|---|
|
#18+
GVF112GVFjack_nsk, Есть несколько путей решения - простой, сложный и очень сложный. Труднее всего - найти простой ... и опыт сын ошибок трудных ... :) Думаю, что проблему можно обойти. Как - решать Вам ... ;) С уважением, Вадим. простой путь - Код: plaintext 1. 2. 3. 4. 5. 6. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 29.08.2010, 15:48 |
|
||
|
|

start [/forum/topic.php?fid=43&msg=36815293&tid=1602612]: |
0ms |
get settings: |
9ms |
get forum list: |
14ms |
check forum access: |
4ms |
check topic access: |
4ms |
track hit: |
92ms |
get topic data: |
10ms |
get forum data: |
3ms |
get page messages: |
48ms |
get tp. blocked users: |
1ms |
| others: | 12ms |
| total: | 197ms |

| 0 / 0 |
